Skip to content

Commit 3f92ce9

Browse files
Merge pull request #15412 from dotty-staging/regression-test-11052
Fix #11052: Add regression tests
2 parents 8bd527e + 579b144 commit 3f92ce9

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/run/i11052a.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class Foo {
2+
implicit class StringShould(private val s: String) {
3+
def should(right: => Unit) = right
4+
}
5+
6+
"Foo" should {
7+
object Weekdays extends Enumeration {
8+
val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
9+
}
10+
println(Weekdays.Mon.toString)
11+
}
12+
}
13+
14+
object Test {
15+
def main(args: Array[String]): Unit = new Foo()
16+
}

tests/run/i11052b.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object Test {
2+
def main(args: Array[String]): Unit = {
3+
object Weekdays extends Enumeration {
4+
val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
5+
}
6+
println(Weekdays.Mon.toString)
7+
}
8+
}

0 commit comments

Comments
 (0)