diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-12 18:12:27 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-12 18:14:04 +0200 |
commit | c7f3b45abf221c432b3fbd7462741b00a9e10142 (patch) | |
tree | 32171eb1c314e64f155fbd05d9ef01e43cac4f53 /tests/pos/t2066.scala | |
parent | 84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (diff) | |
download | dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.gz dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.bz2 dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.zip |
Drop restriction to 2nd order hk types
Allow hk type parameters to be higher kinded themselves.
Diffstat (limited to 'tests/pos/t2066.scala')
-rw-r--r-- | tests/pos/t2066.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pos/t2066.scala b/tests/pos/t2066.scala new file mode 100644 index 000000000..d175769fa --- /dev/null +++ b/tests/pos/t2066.scala @@ -0,0 +1,25 @@ +trait A1 { + def f[T[+_]] = () +} + +trait B1 extends A1 { + override def f[T[+_]] = () +} + + +trait A2 { + def f[T[-_]] = () +} + +trait B2 extends A2 { + override def f[T[-_]] = () +} + + +trait A3 { + def f[T[X[+_]]] = () +} + +trait B3 extends A3 { + override def f[T[X[+_]]] = () +} |