Skip to content

No such global error when trying to write a closure #8

@martin-t

Description

@martin-t

Code:

function f() -> begin
    let local = 123;
    let o = object begin
        function m() -> local;
    end;
    o.m();
end;

f();

Error:

thread 'main' panicked at 'Interpreter error: Error evaluating get global #3:

Caused by:
    No such global `local`.', src/main.rs:141:14

I guess FML doesn't support closures but it should probably error when compiling, not interpreting.

Metadata

Metadata

Assignees

Labels

wontfixThis will not be worked on

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions