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