-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error in macro ? #7
Comments
Just an hint:
|
There are some strange things goin' on in here... 🤔 |
Your example code stops working immediately after the open ended class Test(T)
def initialize(@sources : Enumerable(T))
@count = @sources.size
end
end
p! 0..
p! Test.new([1, 2, 3]) This raises the same error (https://carc.in/#/r/elfa) Interestingly, the begin-less I'm sensing this might be a Crystal compiler error... |
The open range instantiates |
@straight-shoota Yeah, that's more or less expected. What's weird is outlined in my last comment. |
Ah you mean the part that the begin-less or infinite range are unaffected? That's because |
@straight-shoota Oh, I see, that makes sense, thanks for the explanation. One thing that kinda bothers me is that the error only happens, when there's a reference to the type-matching |
Yes, I think there are two things to do here:
|
@straight-shoota Should I create a ticket for that? |
Sure, go ahead if you like. Otherwise I'll take care of that in the next days. |
@straight-shoota Actually, I'd leave it to you if you don't mind, since I'm out of time for next days. Just wanted to ensure it will be reported. |
I'm gonna keep it open as a reminder for the issues raised. |
I created crystal-lang/crystal#13121 and crystal-lang/crystal#13123 to track the raised issues. |
Given the following code:
with
p! t
, I get# => #<Test(Int32):0x7f83d3425e70 @sources=[1, 2, 3], @count=3>
, which is expected, but withdebug!(t)
, an error occurs :The full trace is in the attached zip file:
zzz.trace.zip
Thanks for this shard I find very useful.
The text was updated successfully, but these errors were encountered: