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

Metamodel version of ProducedType.getSupertype(TypeDeclaration) #672

Open
tombentley opened this issue May 8, 2015 · 4 comments
Open

Metamodel version of ProducedType.getSupertype(TypeDeclaration) #672

tombentley opened this issue May 8, 2015 · 4 comments

Comments

@tombentley
Copy link
Member

Currently although you can ask a ceylon.language.meta.model::Type whether it is a subtype of another Type, you cannot get the principal instantiation of that other type that it's a subtype of. In other words we don't have the metamodel version of the typechecker's ProducedType.getSupertype(TypeDeclaration).

The main impediment to resolving this is needing to implement the whole algorithm for computing principal instantiations in Ceylon. (We could implement this today for the JVM, but the metamodel needs to work on JS too).

This came up here.

@gavinking gavinking added this to the 1.2 milestone May 8, 2015
@gavinking
Copy link
Member

Note: to implement this for any Type is perhaps a bit for work. To implement it just for ClassOrInterface should be pretty trivial.

@gavinking
Copy link
Member

@chochos, thoughts?

@chochos
Copy link
Member

chochos commented May 13, 2015

Right, doing it only for ClassOrInterface shouldn't be too hard. But is it useful?

OTOH, can we really implement the algorithm @tombentley mentions, completely in Ceylon, using the existing metamodel stuff? Perhaps if there are only a couple of things that need to be native, we can encapsule them in separate native methods, although I don't know if native compilation is working already for JVM.

@FroMage
Copy link
Member

FroMage commented Jun 16, 2015

This sounds too hard, let's move it to the next release.

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

4 participants