File tree Expand file tree Collapse file tree 8 files changed +248
-55
lines changed
input/src/main/scala/example Expand file tree Collapse file tree 8 files changed +248
-55
lines changed Original file line number Diff line number Diff line change 1
1
package example
2
2
3
+ class CDep [X ]
4
+ class CDependenat [X ](var x1 : CDep [X ])
5
+ class CVarArg (var x1 : Int )
6
+
7
+
8
+ class CDefaultWrapper {
9
+ val glob = 3
10
+ class Cdefault (val x1 : Int = glob)
11
+ }
3
12
class C1 (val x1 : Int ) extends AnyVal
4
13
5
14
class C2 (val x2 : Int ) extends AnyVal
6
15
object C2
7
16
8
- case class C3 (x : Int )
17
+ case class C3 [ Y ] (x : Int )
9
18
10
19
case class C4 (x : Int )
11
- object C4
20
+ object C4 {
21
+ val foo : Int = 4
22
+ }
12
23
13
24
object M {
14
25
implicit class C5 (x : Int )
@@ -30,4 +41,15 @@ object N {
30
41
val local = 2
31
42
local + 2
32
43
}
33
- }
44
+
45
+ val otheranon = {
46
+ var a = 1
47
+ a
48
+ }
49
+
50
+ val lastanon = {
51
+ val a = new CVarArg (4 )
52
+ a.x1 = 8
53
+ a.x1
54
+ }
55
+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class Example {
14
14
x +
15
15
y
16
16
)
17
+ var b = 4
17
18
}
18
19
19
20
class ExampleInit {
Original file line number Diff line number Diff line change @@ -3,7 +3,15 @@ package example
3
3
class Bonjour () {
4
4
}
5
5
6
+ class Bonjour2 (val x : Int ) {
7
+ def this (x: String ) = this (2 )
8
+ }
9
+
6
10
class TestNew extends C {
7
11
val b = new B
8
12
val c = new Bonjour
13
+ val d = new Bonjour ()
14
+ val e = new Bonjour2 (2 )
15
+ val f = new Bonjour2 (" a" )
16
+ val _ = f.x
9
17
}
Original file line number Diff line number Diff line change
1
+ package example
2
+
3
+ abstract class Ctest (val xp : Int , val xe : AnyRef ) {
4
+ val xm : Int = ???
5
+ val xam : Int
6
+ private [this ] val xlm : Int = ???
7
+ def m = {
8
+ val xl : Int = ???
9
+ type S = { val xs : Int }
10
+ type E = xe.type
11
+ }
12
+ }
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ object TypTest {
36
36
def n : Int = ???
37
37
}
38
38
39
+ class B {
40
+ def x : Int = 4
41
+ }
42
+
39
43
class C extends M {
40
44
val p = new TypP
41
45
val x = p.x
@@ -71,7 +75,7 @@ object TypTest {
71
75
typeLambda1[({ type L [T ] = List [T ] })# L ]
72
76
73
77
object ClassInfoType1
74
- class ClassInfoType2 extends B { def x = 42 }
78
+ class ClassInfoType2 extends B { override def x = 42 }
75
79
trait ClassInfoType3 [T ]
76
80
77
81
object MethodType {
Original file line number Diff line number Diff line change
1
+ package example
2
+
3
+ import scala .language .existentials
4
+ import scala .language .higherKinds
5
+
6
+ class ann [T ](x : T ) extends scala.annotation.StaticAnnotation
7
+ class ann1 extends scala.annotation.StaticAnnotation
8
+ class ann2 extends scala.annotation.StaticAnnotation
9
+
10
+ object TypTestAnnots {
11
+ val annType1 : T @ ann(42 ) = ???
12
+ val annType2 : T @ ann1 @ ann2 = ???
13
+ }
You can’t perform that action at this time.
0 commit comments