Compiler: Fix empty return compound codegen
This commit is contained in:
@@ -9,11 +9,7 @@ Pop :: (a: *Array($T)): T
|
||||
if a.len > 0
|
||||
a.len -= 1
|
||||
return a.data[a.len]
|
||||
// @reproduction: c compile error, probably because of compound expression (Array){}
|
||||
// return {}
|
||||
|
||||
result: T
|
||||
return result
|
||||
return {}
|
||||
|
||||
Contains :: (a: *Array($T), item: *T): bool
|
||||
result := item >= a.data && item < a.data + a.len
|
||||
|
||||
Reference in New Issue
Block a user