From 579b14432d6ec8a13dd06fb432d1b9de4442d702 Mon Sep 17 00:00:00 2001 From: Anatolii Kmetiuk Date: Thu, 9 Jun 2022 14:50:34 +0200 Subject: [PATCH] Fix #11052: Add regression tests --- tests/run/i11052a.scala | 16 ++++++++++++++++ tests/run/i11052b.scala | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/run/i11052a.scala create mode 100644 tests/run/i11052b.scala diff --git a/tests/run/i11052a.scala b/tests/run/i11052a.scala new file mode 100644 index 000000000000..376c54a9b6d8 --- /dev/null +++ b/tests/run/i11052a.scala @@ -0,0 +1,16 @@ +class Foo { + implicit class StringShould(private val s: String) { + def should(right: => Unit) = right + } + + "Foo" should { + object Weekdays extends Enumeration { + val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value + } + println(Weekdays.Mon.toString) + } +} + +object Test { + def main(args: Array[String]): Unit = new Foo() +} diff --git a/tests/run/i11052b.scala b/tests/run/i11052b.scala new file mode 100644 index 000000000000..0e682f1f66d9 --- /dev/null +++ b/tests/run/i11052b.scala @@ -0,0 +1,8 @@ +object Test { + def main(args: Array[String]): Unit = { + object Weekdays extends Enumeration { + val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value + } + println(Weekdays.Mon.toString) + } +}