Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a565d0

Browse files
use braceless syntax in SIP67Tests
1 parent 5778bea commit 0a565d0

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed
Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// filepath: /home/mberndt/scala3/compiler/test/dotty/tools/dotc/typer/SIP67Tests.scala
21
package dotty.tools.dotc.typer
32

43
import dotty.tools.DottyTest
@@ -7,46 +6,38 @@ import dotty.tools.dotc.core.Contexts.*
76
import org.junit.Test
87
import org.junit.Assert.fail
98

10-
class SIP67Tests extends DottyTest {
11-
9+
class SIP67Tests extends DottyTest:
1210

1311
@Test
14-
def sip67test1: Unit = {
12+
def sip67test1: Unit =
1513
val source = """
1614
import scala.language.strictEquality
17-
enum Foo {
15+
enum Foo:
1816
case Bar
19-
}
2017
2118
val _ =
22-
(??? : Foo) match {
19+
(??? : Foo) match
2320
case Foo.Bar =>
24-
}
2521
"""
26-
val ctx = checkCompile("typer", source) { (_, ctx) => }
22+
val ctx = checkCompile("typer", source)((_, ctx) => ())
23+
2724
if ctx.reporter.hasErrors then
2825
fail("Unexpected compilation errors were reported")
29-
}
3026

3127
@Test
32-
def sip67test2: Unit = {
28+
def sip67test2: Unit =
3329
val source = """
3430
import scala.language.strictEquality
3531
3632
sealed trait Foo
3733
38-
object Foo {
34+
object Foo:
3935
case object Bar extends Foo
40-
}
4136
4237
val _ =
43-
(??? : Foo) match {
38+
(??? : Foo) match
4439
case Foo.Bar =>
45-
}
4640
"""
47-
val ctx = checkCompile("typer", source) { (_, ctx) => }
41+
val ctx = checkCompile("typer", source)((_, ctx) => ())
4842
if ctx.reporter.hasErrors then
4943
fail("Unexpected compilation errors were reported")
50-
}
51-
52-
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /