diff options
author | Dmitry Petrashko <dark@d-d.me> | 2015-10-20 11:19:24 +0200 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2015-10-20 11:19:24 +0200 |
commit | cbb565a436196b102c27688d1da8f27bea12bae4 (patch) | |
tree | bd2501c2a074ed75b2a10a2b87e17b3d8f272267 /tests | |
parent | 78d769004bdcd152f9f4816bb5cf699aeeb73ff3 (diff) | |
parent | 6cca64fa0aa37942812d1c870b99f309dab67352 (diff) | |
download | dotty-cbb565a436196b102c27688d1da8f27bea12bae4.tar.gz dotty-cbb565a436196b102c27688d1da8f27bea12bae4.tar.bz2 dotty-cbb565a436196b102c27688d1da8f27bea12bae4.zip |
Merge pull request #821 from dotty-staging/fix-check-simple-kinded
Check that some types are not higher-kinded.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/typers.scala | 8 | ||||
-rw-r--r-- | tests/pos/polyalias.scala | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/neg/typers.scala b/tests/neg/typers.scala index 9fcc63e38..8bd39a557 100644 --- a/tests/neg/typers.scala +++ b/tests/neg/typers.scala @@ -29,8 +29,14 @@ object typers { def g[T](x: T): T = x // OK! } + type L[X] = scala.collection.immutable.List[X] + type M[X, Y] <: scala.collection.immutable.Map[X, Y] - + object hk { + def f(x: L) // error: missing type parameter + : M = // error: missing type parameter + ??? : M // error: missing type parameter + } object returns { diff --git a/tests/pos/polyalias.scala b/tests/pos/polyalias.scala index 07bb241f0..6ce0e3230 100644 --- a/tests/pos/polyalias.scala +++ b/tests/pos/polyalias.scala @@ -3,7 +3,7 @@ object Test { type S = scala.Predef.Set - val z: S = ??? + val z: S[_] = ??? type Pair[T] = (T, T) |