You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining nested functions other functions scopes can poison inner ones:
fn foo(): Number
100
end
print foo() # => 100
fn bar(): Number
print foo()
fn foo(): Number
-934
end
print foo()
end
let b = bar() # => -934
# => -934
print b == foo() # => false
This test case will currently fail. The inner foo declaration will be emitted to the same LLVM function as the outer one. The solution is to mangle each function's name when emitting the LLVM function. Probably best grouped together with #22 and #17.
Maybe we want to keep a side-table of information about each function (return type, parameters, mangled name etc.) in the lower context. We would need a consistent and quick way of finding these declarations.
The text was updated successfully, but these errors were encountered:
When defining nested functions other functions scopes can poison inner ones:
This test case will currently fail. The inner
foo
declaration will be emitted to the same LLVM function as the outer one. The solution is to mangle each function's name when emitting the LLVM function. Probably best grouped together with #22 and #17.Maybe we want to keep a side-table of information about each function (return type, parameters, mangled name etc.) in the lower context. We would need a consistent and quick way of finding these declarations.
The text was updated successfully, but these errors were encountered: