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 11package example
22
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+ }
312class C1 (val x1 : Int ) extends AnyVal
413
514class C2 (val x2 : Int ) extends AnyVal
615object C2
716
8- case class C3 (x : Int )
17+ case class C3 [ Y ] (x : Int )
918
1019case class C4 (x : Int )
11- object C4
20+ object C4 {
21+ val foo : Int = 4
22+ }
1223
1324object M {
1425 implicit class C5 (x : Int )
@@ -30,4 +41,15 @@ object N {
3041 val local = 2
3142 local + 2
3243 }
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 {
1414 x +
1515 y
1616 )
17+ var b = 4
1718}
1819
1920class ExampleInit {
Original file line number Diff line number Diff line change @@ -3,7 +3,15 @@ package example
33class Bonjour () {
44}
55
6+ class Bonjour2 (val x : Int ) {
7+ def this (x: String ) = this (2 )
8+ }
9+
610class TestNew extends C {
711 val b = new B
812 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
917}
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 {
3636 def n : Int = ???
3737 }
3838
39+ class B {
40+ def x : Int = 4
41+ }
42+
3943 class C extends M {
4044 val p = new TypP
4145 val x = p.x
@@ -71,7 +75,7 @@ object TypTest {
7175 typeLambda1[({ type L [T ] = List [T ] })# L ]
7276
7377 object ClassInfoType1
74- class ClassInfoType2 extends B { def x = 42 }
78+ class ClassInfoType2 extends B { override def x = 42 }
7579 trait ClassInfoType3 [T ]
7680
7781 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