Experiment with scopes #244
Replies: 4 comments 1 reply
-
First of all, thank you for looking in Kolasu! |
Beta Was this translation helpful? Give feedback.
-
I can prepare a test/fork for you... as soon as I have time. Nevertheless it's simple: it's just to change this line: with the code I've posted above, and run the test. It runs without problem but AFAIK it should not. What I mean is that |
Beta Was this translation helpful? Give feedback.
-
I've added 2 tests, both fail but I think both should pass instead. |
Beta Was this translation helpful? Give feedback.
-
Thank you Marco, I appreciate this! |
Beta Was this translation helpful? Give feedback.
-
I've made some experiments with scopes, but I'm still not getting to point... probably.
What I've tried is a RefExpr(context = RefExpr(context = CallExpr())), see below, so that the middle RefExpr change the type (from class_1 to class_0). In this case with the same
symbol
on both RefExpr they got resolved but AFAIK one of they should not.The problem can probably be resolved with an
if (context is RefExpr)...
in the RefExpr scope but I'm feeling the code is getting weird this way.This is the code I've added that results in no error where it should:
Whereas it fires an error with the right field name:
Beta Was this translation helpful? Give feedback.
All reactions