Skip to content
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

abstract struct require class variables to be initialized #2957

Closed
bcardiff opened this issue Jul 5, 2016 · 1 comment
Closed

abstract struct require class variables to be initialized #2957

bcardiff opened this issue Jul 5, 2016 · 1 comment

Comments

@bcardiff
Copy link
Member

bcardiff commented Jul 5, 2016

abstract struct Foo
  @@a : Int32
end

struct Bar < Foo
  @@a = 0
end

Compiles in 0.18.6 but it doesn't in 0.18.7

https://play.crystal-lang.org/#/r/1344
https://play.crystal-lang.org/#/r/1343

I don't think the changes in 0.18.7 aimed for this to happen.
But maybe I missed something.

@asterite
Copy link
Member

asterite commented Jul 5, 2016

Probably shouldn't have compiled in 0.18.6 either.

This is a duplicate of #2827 and I don't think it's a bug (but of course it can be discussed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants