diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t3987.check | 6 | ||||
-rw-r--r-- | test/files/neg/t3987.scala | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/t3987.check b/test/files/neg/t3987.check new file mode 100644 index 0000000000..d72e2d4828 --- /dev/null +++ b/test/files/neg/t3987.check @@ -0,0 +1,6 @@ +t3987.scala:11: error: type mismatch; + found : Gox + required: Test.GoxZed + val y: GoxZed = x + ^ +one error found diff --git a/test/files/neg/t3987.scala b/test/files/neg/t3987.scala new file mode 100644 index 0000000000..1226d80228 --- /dev/null +++ b/test/files/neg/t3987.scala @@ -0,0 +1,13 @@ +class Gox { + object Zed { } + class Zed { } +} + +object Test { + type GoxZed = t#Zed forSome { type t <: Gox } + + def main(args: Array[String]): Unit = { + val x = new Gox + val y: GoxZed = x + } +} |