diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-06-20 12:51:39 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-06-20 12:51:39 +0000 |
commit | a4faf441711afcccaffb2329bc409139c604eb4c (patch) | |
tree | aeabaf86b603a975b7aa95fb18917ea4b11eb6d3 /test/files/neg/wellkinded_wrongarity2.check | |
parent | ff5d9c9afa938429d94330b5325a492205cead5d (diff) | |
download | scala-a4faf441711afcccaffb2329bc409139c604eb4c.tar.gz scala-a4faf441711afcccaffb2329bc409139c604eb4c.tar.bz2 scala-a4faf441711afcccaffb2329bc409139c604eb4c.zip |
fixed bug1188
fix kind-checking in adapt: it checked tree.symbol.typeParams, which makes m[t] look like a higher-kinded type, even though it's of kind * (the symbol doesn't know about the application to t)...
now using tree.tpe.typeParams
removed check for tree.hasSymbol (TypeTree's must also be checked,
and they don't directly have a symbol) replaced tree.symbol by
tree.tpe.symbol
Diffstat (limited to 'test/files/neg/wellkinded_wrongarity2.check')
-rw-r--r-- | test/files/neg/wellkinded_wrongarity2.check | 15 |
1 files changed, 12 insertions, 3 deletions
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 |