diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-01 18:27:02 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-03-01 18:27:02 +0100 |
commit | b9e576ad1ba0ff02c550c821648f23905477e545 (patch) | |
tree | 5d8116af63cb38a52861941058a1eea62057e8d4 /tests/neg | |
parent | 340ca0615bc40ca0232143b1d7e206c56e721c5c (diff) | |
download | dotty-b9e576ad1ba0ff02c550c821648f23905477e545.tar.gz dotty-b9e576ad1ba0ff02c550c821648f23905477e545.tar.bz2 dotty-b9e576ad1ba0ff02c550c821648f23905477e545.zip |
Check that inferred parent classes are feasible.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/templateParents.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/neg/templateParents.scala b/tests/neg/templateParents.scala index 637c6037a..6ecc8c384 100644 --- a/tests/neg/templateParents.scala +++ b/tests/neg/templateParents.scala @@ -7,3 +7,10 @@ object templateParentsNeg { new C("b") with C2 // error: C2 is not a trait } +object templateParentsNeg1 { + class C[T] + trait D extends C[String] + trait E extends C[Int] + + val x = new D with E // error no type fits between inferred bounds +}
\ No newline at end of file |