diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t1659.check | 5 | ||||
-rw-r--r-- | test/files/neg/t1659.scala | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/t1659.check b/test/files/neg/t1659.check new file mode 100644 index 0000000000..b4b3e8605e --- /dev/null +++ b/test/files/neg/t1659.check @@ -0,0 +1,5 @@ +t1659.scala:3: error: overriding method u in trait W of type [A](Y{type X = A})Unit; + method u has incompatible type +class Z extends W { def u[A](v : Y { type X = A }) = null } + ^ +one error found diff --git a/test/files/neg/t1659.scala b/test/files/neg/t1659.scala new file mode 100644 index 0000000000..10470d66f8 --- /dev/null +++ b/test/files/neg/t1659.scala @@ -0,0 +1,4 @@ +trait Y { type X } +trait W { def u[A](v : Y { type X = A }) : Unit } +class Z extends W { def u[A](v : Y { type X = A }) = null } + |