From b6496eb321a042d67fdeea72d23f17e33271ee9f Mon Sep 17 00:00:00 2001 From: Tom Grigg Date: Wed, 14 Oct 2020 23:14:23 -0700 Subject: [PATCH] Add regression tests for #7745 #9292 #9330 #9331 #9332 --- tests/fuzzy/i9292.scala | 4 ++++ tests/neg/i9330.scala | 4 ++++ tests/neg/i9331.scala | 5 +++++ tests/neg/i9332.scala | 5 +++++ tests/{pending => }/pos/i7745.scala | 0 5 files changed, 18 insertions(+) create mode 100644 tests/fuzzy/i9292.scala create mode 100644 tests/neg/i9330.scala create mode 100644 tests/neg/i9331.scala create mode 100644 tests/neg/i9332.scala rename tests/{pending => }/pos/i7745.scala (100%) diff --git a/tests/fuzzy/i9292.scala b/tests/fuzzy/i9292.scala new file mode 100644 index 000000000000..fb53931bcd54 --- /dev/null +++ b/tests/fuzzy/i9292.scala @@ -0,0 +1,4 @@ +trait I0[-I1] { +def [@specialized(List[I2], i3 +val +def i3(i4: Int } diff --git a/tests/neg/i9330.scala b/tests/neg/i9330.scala new file mode 100644 index 000000000000..6ba57c033473 --- /dev/null +++ b/tests/neg/i9330.scala @@ -0,0 +1,4 @@ +val x = { + () == "" + implicit def foo[A: A] // error // error // error +} diff --git a/tests/neg/i9331.scala b/tests/neg/i9331.scala new file mode 100644 index 000000000000..6926182ae6ea --- /dev/null +++ b/tests/neg/i9331.scala @@ -0,0 +1,5 @@ +package object Foo { + (1: Any) match { + case Foo => 1 // error + } +} diff --git a/tests/neg/i9332.scala b/tests/neg/i9332.scala new file mode 100644 index 000000000000..8dc6f413c206 --- /dev/null +++ b/tests/neg/i9332.scala @@ -0,0 +1,5 @@ +class A { + enum B extends java.lang.Enum[B] { // error: enum extending java.lang.Enum must be declared in a static scope + case C + } +} diff --git a/tests/pending/pos/i7745.scala b/tests/pos/i7745.scala similarity index 100% rename from tests/pending/pos/i7745.scala rename to tests/pos/i7745.scala