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
Stack overflow on compiler #2604
Labels
Comments
I was able to reduce it further, but basically the problem is that the compiler isn't giving you an error for the |
Oh, didn't see @jhass came to almost the same conclusion... |
Reduced further to this: require "spec"
class BlockHolder(T)
def initialize(@klass : Class)
end
def klass
@klass
end
end
class Song
@@block_holder : BlockHolder(Int32)?
def self.build
klass = @@block_holder.try &.klass
klass.inspect
end
end
describe "" do
it "" do
Song.build
end
end |
Reduced further class BlockHolder(T)
def initialize(klass_name : Class)
@klass = klass_name
end
def call
@klass
end
end
class Song
@@block_holder : BlockHolder(Song.class)?
def self.build
@@block_holder.try &.call
end
end
class DotFormatter
LETTERS = 1
def report
LETTERS + 1
end
end
Song.build.class
DotFormatter.new.report |
🙇 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the carc that reproduces:
https://carc.in/#/r/ypb
I feel bad opening an issue with this title / description, but I'm not able to track it further
//cc @jhass
The text was updated successfully, but these errors were encountered: