From a910e0a5a34ff8dcecdc74fc563af22e7194221c Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Fri, 4 Sep 2020 11:05:14 +0200 Subject: [PATCH] fix #9325: add regression test --- tests/neg/i9325.scala | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/neg/i9325.scala diff --git a/tests/neg/i9325.scala b/tests/neg/i9325.scala new file mode 100644 index 000000000000..e424ea88f350 --- /dev/null +++ b/tests/neg/i9325.scala @@ -0,0 +1,2 @@ +enum Foo[T] extends java.lang.Enum[Foo[T]] { case Red extends Foo[Int]; case Blue extends Foo[String] } +val res0 = (Foo.Red: Foo[?]) compareTo Foo.Blue // error: type mismatch Found (Foo.Blue : Foo[String]) Expected ?1.E