Created
February 10, 2014 01:01
-
-
Save paulp/8908555 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package p { | |
trait N { type Name ; def make(): Name } | |
trait N1 extends N { class Name ; def make(): Name = new Name } | |
trait N2 extends N { class Name } | |
object g extends App with N1 with N2 { | |
val x = (this: N2).make() | |
// java.lang.ClassCastException: p.N1$Name cannot be cast to p.N2$Name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ugh. Can't recall what link brought me here, but this definitely seems like a bug. Is there already an open issue?