aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-10-07 12:42:38 +0200
committerMartin Odersky <odersky@gmail.com>2015-10-07 13:41:58 +0200
commit6cca64fa0aa37942812d1c870b99f309dab67352 (patch)
tree5d2e357e72c22ca64a8fad770a8002fc4ff15bcf /tests
parenta8c8bdad57941071b85caa54bc57b84d8ca7d526 (diff)
downloaddotty-6cca64fa0aa37942812d1c870b99f309dab67352.tar.gz
dotty-6cca64fa0aa37942812d1c870b99f309dab67352.tar.bz2
dotty-6cca64fa0aa37942812d1c870b99f309dab67352.zip
Check that some types are not higher-kinded.
Invalidates #813. Review by @darkdimius.
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/typers.scala8
-rw-r--r--tests/pos/polyalias.scala2
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)