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

Compiler: fixed VirtualMetaclassType#metaclass #4375

Conversation

rockwyc992
Copy link
Contributor

@rockwyc992 rockwyc992 commented May 3, 2017

Fixed #4374

VirtualMetaclassType#metaclass will use super , find in Type#metaclass ,
but it should override this method like what MetaclassType#metaclass does.

@bew
Copy link
Contributor

bew commented May 3, 2017

Can you add a spec for:

Class.class.is_a?(Class)
Class.class.is_a?(Class.class)

@rockwyc992
Copy link
Contributor Author

I think that is unnecessary.
Class.class.is_a?(A) should be equivalent to Class.is_a?(A).

@ozra
Copy link
Contributor

ozra commented May 5, 2017

@rockwyc992 ...with emphasis on "should be" - the spec is almost written right there ;-)

fixed crystal-lang#4374

VirtualMetaclassType#metaclass will use super(Type)#metaclass
but it should override this method like what MetaclassType#metaclass do.
MetaclassType#metaclass has already implement that.
@rockwyc992 rockwyc992 force-pushed the fix/compiler/VirtualMetaclassType_metaclass branch from 847d8ed to 34415f9 Compare May 13, 2017 06:48
@rockwyc992
Copy link
Contributor Author

I rebased this PR to resolve the conflict in spec.

@mverzilli
Copy link

Thanks!

@mverzilli mverzilli merged commit c27629f into crystal-lang:master May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants