-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpreter: cast proc call arguments to proc arg types #12375
Conversation
It seems I'll try to fix it here too... that shouldn't happen. |
Actually, I'll just fix the interpreter for now. |
I can confirm #12388 makes this work without the workaround, so we might want to merge that one first. |
9eb89ba
to
f1dd841
Compare
I just undid the workaround. Let's see if CI passes now :-) |
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
CI failed and I have a fix for this. But I found out that a lot more primitive calls are broken if they happen inside a closure, so I'm going to do a general fix for that. |
…lang/crystal into interpreter/cast-proc-call-args
So, the last non-merge commit is doing this. If you had code like this: struct Enum
def foo
->{
value
}
end
end
enum Color
Red
Green
end
p Color::Green.foo.call the "scope" (the type of |
Fixes #12350
Note that for the example in #12350 to work it also needs #12374 merged.