From 9767782a4766826ef903836609cb34c9bad2df61 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 5 Nov 2015 16:57:54 +0100 Subject: Check bounds of inferred typevars in PostTyper. --- tests/neg/bounds.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/neg/bounds.scala (limited to 'tests/neg/bounds.scala') 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") + } +} -- cgit v1.2.3