File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
compiler/test/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -7,46 +7,38 @@ import dotty.tools.dotc.core.Contexts.*
7
7
import org .junit .Test
8
8
import org .junit .Assert .fail
9
9
10
- class SIP67Tests extends DottyTest {
11
-
10
+ class SIP67Tests extends DottyTest :
12
11
13
12
@ Test
14
- def sip67test1 : Unit = {
13
+ def sip67test1 : Unit =
15
14
val source = """
16
15
import scala.language.strictEquality
17
- enum Foo {
16
+ enum Foo:
18
17
case Bar
19
- }
20
18
21
19
val _ =
22
- (??? : Foo) match {
20
+ (??? : Foo) match
23
21
case Foo.Bar =>
24
- }
25
22
"""
26
- val ctx = checkCompile(" typer" , source) { (_, ctx) => }
23
+ val ctx = checkCompile(" typer" , source)((_, ctx) => ())
24
+
27
25
if ctx.reporter.hasErrors then
28
26
fail(" Unexpected compilation errors were reported" )
29
- }
30
27
31
28
@ Test
32
- def sip67test2 : Unit = {
29
+ def sip67test2 : Unit =
33
30
val source = """
34
31
import scala.language.strictEquality
35
32
36
33
sealed trait Foo
37
34
38
- object Foo {
35
+ object Foo:
39
36
case object Bar extends Foo
40
- }
41
37
42
38
val _ =
43
- (??? : Foo) match {
39
+ (??? : Foo) match
44
40
case Foo.Bar =>
45
- }
46
41
"""
47
- val ctx = checkCompile(" typer" , source) { ( _, ctx) => }
42
+ val ctx = checkCompile(" typer" , source)(( _, ctx) => ())
48
43
if ctx.reporter.hasErrors then
49
44
fail(" Unexpected compilation errors were reported" )
50
- }
51
-
52
- }
You can’t perform that action at this time.
0 commit comments