diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-05 16:57:54 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-05 16:58:18 +0100 |
commit | 9767782a4766826ef903836609cb34c9bad2df61 (patch) | |
tree | 0d67c23e11eb52bdae4b8471aac49086ef5e0cc0 /tests/neg/bounds.scala | |
parent | 5cce9b47427e96ab2159a88137ae74e92939b757 (diff) | |
download | dotty-9767782a4766826ef903836609cb34c9bad2df61.tar.gz dotty-9767782a4766826ef903836609cb34c9bad2df61.tar.bz2 dotty-9767782a4766826ef903836609cb34c9bad2df61.zip |
Check bounds of inferred typevars in PostTyper.
Diffstat (limited to 'tests/neg/bounds.scala')
-rw-r--r-- | tests/neg/bounds.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/neg/bounds.scala b/tests/neg/bounds.scala new file mode 100644 index 000000000..8d2cd8259 --- /dev/null +++ b/tests/neg/bounds.scala @@ -0,0 +1,8 @@ +object Test { + class C[B >: String <: Int](x: B) + def g[B >: String <: Int](x: B): Int = x + def main(args: Array[String]): Unit = { + g("foo") + new C("bar") + } +} |