diff options
Diffstat (limited to 'tests/untried/neg/t2416.scala')
-rw-r--r-- | tests/untried/neg/t2416.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/untried/neg/t2416.scala b/tests/untried/neg/t2416.scala new file mode 100644 index 000000000..6fd2ca229 --- /dev/null +++ b/tests/untried/neg/t2416.scala @@ -0,0 +1,14 @@ +object t2416a { + trait A[X <: Double] { type B = X } + def x : A[Int]#B = 10 // no you won't +} + +object t2416b { + trait A{type B[Y <: Double] = Int} + def x : A#B[Boolean] = 10 // seriously? +} + +object t2416c { + trait A{type B[Z <: Double] = Int} + type C[Z <: A] = Z#B[String] // nuh-uh! +} |