diff options
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/subtyping.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/neg/subtyping.scala b/tests/neg/subtyping.scala index d7f849ddc..a4a5a3d19 100644 --- a/tests/neg/subtyping.scala +++ b/tests/neg/subtyping.scala @@ -4,10 +4,11 @@ class B { class A extends B object Test { - def foo(a: A#X): Unit = { - return; + def test1(): Unit = { + implicitly[B#X <:< A#X] } - def test(): Unit = { - foo(??? : B#X); + def test2(): Unit = { + val a : { type T; type U } = ??? + implicitly[a.T <:< a.U] } } |