Skip to content

Commit 3bf5df8

Browse files
committed
use braceless syntax in SIP67Tests
1 parent 5bf8e4d commit 3bf5df8

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

compiler/test/dotty/tools/dotc/typer/SIP67Tests.scala

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,38 @@ import dotty.tools.dotc.core.Contexts.*
77
import org.junit.Test
88
import org.junit.Assert.fail
99

10-
class SIP67Tests extends DottyTest {
11-
10+
class SIP67Tests extends DottyTest:
1211

1312
@Test
14-
def sip67test1: Unit = {
13+
def sip67test1: Unit =
1514
val source = """
1615
import scala.language.strictEquality
17-
enum Foo {
16+
enum Foo:
1817
case Bar
19-
}
2018
2119
val _ =
22-
(??? : Foo) match {
20+
(??? : Foo) match
2321
case Foo.Bar =>
24-
}
2522
"""
26-
val ctx = checkCompile("typer", source) { (_, ctx) => }
23+
val ctx = checkCompile("typer", source)((_, ctx) => ())
24+
2725
if ctx.reporter.hasErrors then
2826
fail("Unexpected compilation errors were reported")
29-
}
3027

3128
@Test
32-
def sip67test2: Unit = {
29+
def sip67test2: Unit =
3330
val source = """
3431
import scala.language.strictEquality
3532
3633
sealed trait Foo
3734
38-
object Foo {
35+
object Foo:
3936
case object Bar extends Foo
40-
}
4137
4238
val _ =
43-
(??? : Foo) match {
39+
(??? : Foo) match
4440
case Foo.Bar =>
45-
}
4641
"""
47-
val ctx = checkCompile("typer", source) { (_, ctx) => }
42+
val ctx = checkCompile("typer", source)((_, ctx) => ())
4843
if ctx.reporter.hasErrors then
4944
fail("Unexpected compilation errors were reported")
50-
}
51-
52-
}

0 commit comments

Comments
 (0)