Fixes issue where functions could not be found if local and imported names clashed.

This commit is contained in:
Christoffer Lerno
2022-08-18 20:03:59 +02:00
parent 656faa55bf
commit 1858600449
9 changed files with 66 additions and 8 deletions

View File

@@ -1,10 +1,9 @@
module std::core::array;
import std::core::mem::array;
macro tconcat(arr1, arr2)
{
var $Type = $typeof(arr1[0]);
$Type[] result = mem::array::talloc($Type, arr1.len + arr2.len);
$Type[] result = array::talloc($Type, arr1.len + arr2.len);
if (arr1.len > 0)
{
mem::copy(result.ptr, &arr1[0], arr1.len * $Type.sizeof, $alignof($Type), $alignof($Type));
@@ -19,7 +18,7 @@ macro tconcat(arr1, arr2)
macro concat(arr1, arr2)
{
var $Type = $typeof(arr1[0]);
$Type[] result = mem::array::alloc($Type, arr1.len + arr2.len);
$Type[] result = array::alloc($Type, arr1.len + arr2.len);
if (arr1.len > 0)
{
mem::copy(result.ptr, &arr1[0], arr1.len * $Type.sizeof, $alignof($Type), $alignof($Type));