summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/wellkinded_wrongarity.check2
-rw-r--r--test/files/neg/wellkinded_wrongarity2.check15
-rw-r--r--test/files/neg/wellkinded_wrongarity2.scala10
3 files changed, 22 insertions, 5 deletions
diff --git a/test/files/neg/wellkinded_wrongarity.check b/test/files/neg/wellkinded_wrongarity.check
index 548b5e40bb..1dc38db5c1 100644
--- a/test/files/neg/wellkinded_wrongarity.check
+++ b/test/files/neg/wellkinded_wrongarity.check
@@ -1,4 +1,4 @@
-wellkinded_wrongarity.scala:5: error: type Pair takes two type parameters, expected: one
+wellkinded_wrongarity.scala:5: error: Pair takes two type parameters, expected: one
object mp extends Monad[Pair]
^
one error found
diff --git a/test/files/neg/wellkinded_wrongarity2.check b/test/files/neg/wellkinded_wrongarity2.check
index 353d2368a1..922f73381e 100644
--- a/test/files/neg/wellkinded_wrongarity2.check
+++ b/test/files/neg/wellkinded_wrongarity2.check
@@ -1,4 +1,13 @@
-wellkinded_wrongarity2.scala:4: error: type String takes no type parameters, expected: one
-object ms extends Monad[String]
+wellkinded_wrongarity2.scala:5: error: String takes no type parameters, expected: one
+trait ms1 extends Monad[String] // wrong
^
-one error found
+wellkinded_wrongarity2.scala:6: error: t takes no type parameters, expected: one
+trait ms2[t] extends Monad[t] // wrong
+ ^
+wellkinded_wrongarity2.scala:7: error: m[t] takes no type parameters, expected: one
+trait ms3[m[_], t] extends Monad[m[t]] // wrong -- added to check regression on bug
+ ^
+wellkinded_wrongarity2.scala:12: error: type m takes type parameters
+trait Bar2[m[_]] extends Foo[m] // check that m is properly recognized as kind *->*, while * is expected
+ ^
+four errors found
diff --git a/test/files/neg/wellkinded_wrongarity2.scala b/test/files/neg/wellkinded_wrongarity2.scala
index ee9d771aaa..3154732672 100644
--- a/test/files/neg/wellkinded_wrongarity2.scala
+++ b/test/files/neg/wellkinded_wrongarity2.scala
@@ -1,4 +1,12 @@
// test well-kindedness checks
+
+// expecting types of kind *->*
class Monad[m[x]]
+trait ms1 extends Monad[String] // wrong
+trait ms2[t] extends Monad[t] // wrong
+trait ms3[m[_], t] extends Monad[m[t]] // wrong -- added to check regression on bug
-object ms extends Monad[String] \ No newline at end of file
+// expecting types of kind *
+trait Foo[x]
+trait Bar1[m[_]] extends Foo[m[Int]] // check that m[Int] is properly recognized as kind-*
+trait Bar2[m[_]] extends Foo[m] // check that m is properly recognized as kind *->*, while * is expected \ No newline at end of file