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

Can't refine interface method with raw types #1162

Open
FroMage opened this issue Jun 6, 2013 · 4 comments
Open

Can't refine interface method with raw types #1162

FroMage opened this issue Jun 6, 2013 · 4 comments
Milestone

Comments

@FroMage
Copy link
Member

FroMage commented Jun 6, 2013

We get trouble when we refine methods with raw types:

public interface Raw<T> {
 Raw method(Raw x);
}
shared class Foo() satisfies Raw<Object>{
 shared actual Raw<Object> method(Raw<Object> x){ return x; }
}

Because we can't refine raw stuff with non-raw stuff.

@gavinking
Copy link
Member

You could always just disallow this by pretending method is final in the model loader....

@FroMage
Copy link
Member Author

FroMage commented Aug 2, 2013

Well, I think the problem is that people will want to do that ;)

@FroMage
Copy link
Member Author

FroMage commented Aug 2, 2013

Moved to 1.0

@FroMage
Copy link
Member Author

FroMage commented Oct 24, 2013

I don't think we can do that without something special such as being able to add compiler annotations in the middle of a type expression:

shared class Foo() satisfies Raw<Object>{
 shared actual @raw Raw method(@raw Raw x){ return x; }
}

I guess we can do this ATM for toplevel types, but not in the case of Foo<@raw Bar>.

I'm moving this to 1.2

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