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
// We don't want the scope pass to run on typeparams. The compiler would think
// that type parameters are declared twice.
ast_pass_record(typeparams, PASS_SCOPE);
pony_assert(ast_id(typeparam_store) ==TK_NONE);
ast_replace(&typeparam_store, typeparams);
returnAST_OK;
In the above code, ast_id(typeparam_store) evaluates to TK_TYPEPARAMS, so it seems that the compiler might have run the scope pass twice for this function (one for the original function, then again when expanding the lambda).
The text was updated successfully, but these errors were encountered:
I can verify that the same piece of ast goes twice through the scope pass. @jemc you might have some context for this, the ast_visit function checks if any ast node has gone through a specific pass before by checking the ast flags. Does the "catch up" process for lambdas clear any of these flags?
This code:
Produces the following error:
Backtrace
Code snippet here:
ponyc/src/libponyc/pass/scope.c
Lines 288 to 293 in 285ff8a
In the above code,
ast_id(typeparam_store)
evaluates toTK_TYPEPARAMS
, so it seems that the compiler might have run the scope pass twice for this function (one for the original function, then again when expanding the lambda).The text was updated successfully, but these errors were encountered: