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
Illegal type selection from volatile type null in return type projection #6042
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6042?orig=1
|
DaveScala (davescala) said: |
@paulp said: |
DaveScala (davescala) said: |
@paulp said: |
DaveScala (davescala) said: |
@retronym said: I suspect that it's related to stricter/better as-seen-from in the light of existentials; I'll poke around a bit more and report back soon. |
@retronym said (edited on Jul 8, 2012 1:08:40 PM UTC): It will now issue: t6042.scala:7: error: illegal type selection from volatile type a.OpSemExp (with upper bound LazyExp[a.OpSemExp] with _$1) The |
DaveScala (davescala) said:
into
did make the error go away and then projecting on Val is possible. But is the type selection volatile because of type erasure? Only this
is not allowed.
Probably the type parameter This is volatile because of type erasure. Maybe macros? |
@retronym said (edited on Jul 8, 2012 2:11:25 PM UTC): Dependent method types might offer a solution here. It would be best to move further discussion to the mailing list. (Closed as "not a bug" because the type error is correct, the error message itself was buggy and has been fixed) |
DaveScala (davescala) said: |
The code below worked in 2.9.2 but not in 2.10.0-M4.
The return type projection Exp#OpSemExp#Val raises the obscure compile time error "Illegal type selection from volatile type null", so Exp#Val is not seen as a subtype of Exp#OpSemExp#Val anymore. For semantic reasons it is not allowed to remove #Val. It must work like that.
This issue seems to be a blocker, because the coder has to go to 2.10 for TypeTag, because there is another problem in which Manifest is too limited.
see thread http://groups.google.com/group/scala-user/browse_thread/thread/599b99bb2ee9ddd2
The associated thread of this issue is:
http://groups.google.com/group/scala-user/browse_thread/thread/ab77f705fe22a246
I have narrowed the code below. If I narrow it further then I get errors in 2.9.2 too, so this is the minimal representative (I assume, because I don't know if semantically that statement is true, I don't understand this kind of type level programming) and maybe can be used as unit test. However use the project EDSL as regression test, because there might be some other issue connected that can popup and then is useless for the original coder.
The text was updated successfully, but these errors were encountered: