@@ -14,7 +14,7 @@ object Foo {
14
14
15
15
package scala2main .unused .args:
16
16
object happyBirthday {
17
- def main (args : Array [String ]): Unit = println(" Hello World" ) // error
17
+ def main (args : Array [String ]): Unit = println(" Hello World" ) // ok
18
18
}
19
19
20
20
package scala2main:
@@ -31,27 +31,27 @@ package scala3main:
31
31
package foo .test .lambda .param:
32
32
val default_val = 1
33
33
val a = (i : Int ) => i // OK
34
- val b = (i : Int ) => default_val // error
34
+ val b = (i : Int ) => default_val // OK
35
35
val c = (_ : Int ) => default_val // OK
36
36
37
37
package foo .test .trivial:
38
38
/* A twisted test from Scala 2 */
39
39
class C {
40
40
def answer : 42 = 42
41
41
object X
42
- def g0 (x : Int ) = ??? // OK
43
- def f0 (x : Int ) = () // OK
44
- def f1 (x : Int ) = throw new RuntimeException // OK
45
- def f2 (x : Int ) = 42 // OK
46
- def f3 (x : Int ): Option [Int ] = None // OK
47
- def f4 (x : Int ) = classOf [Int ] // OK
48
- def f5 (x : Int ) = answer + 27 // OK
49
- def f6 (x : Int ) = X // OK
50
- def f7 (x : Int ) = Y // OK
51
- def f8 (x : Int ): List [C ] = Nil // OK
52
- def f9 (x : Int ): List [Int ] = List (1 ,2 ,3 ,4 ) // error
53
- def foo : Int = 32 // OK
54
- def f77 (x : Int ) = foo // error
42
+ private def g0 (x : Int ) = ??? // OK
43
+ private def f0 (x : Int ) = () // OK
44
+ private def f1 (x : Int ) = throw new RuntimeException // OK
45
+ private def f2 (x : Int ) = 42 // OK
46
+ private def f3 (x : Int ): Option [Int ] = None // OK
47
+ private def f4 (x : Int ) = classOf [Int ] // OK
48
+ private def f5 (x : Int ) = answer + 27 // OK
49
+ private def f6 (x : Int ) = X // OK
50
+ private def f7 (x : Int ) = Y // OK
51
+ private def f8 (x : Int ): List [C ] = Nil // OK
52
+ private def f9 (x : Int ): List [Int ] = List (1 ,2 ,3 ,4 ) // error
53
+ private def foo : Int = 32 // OK
54
+ private def f77 (x : Int ) = foo // error
55
55
}
56
56
object Y
57
57
0 commit comments