File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1- break ParentA$ParentB 15 // in ParentA$ParentB.<init>
2- break ParentA 12
1+ break ParentA$ParentB 20 // in ParentA$ParentB.<init>
2+ break ParentA 17
33eval x + y + z
44result xyz
55eval y = "yy"
@@ -9,10 +9,14 @@ result yyz
99eval (new B).m
1010result x
1111
12- break ParentA$ParentB 15
12+ break ParentA$ParentB 20
1313eval x + y + z
1414result xyyz
1515eval y = "yyy"
1616result ()
1717eval m2
1818result yyyz
19+
20+ break TraitA 9
21+ eval u = "uu"; u
22+ result uu
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ object Test:
22 def main (args : Array [String ]): Unit =
33 val a = new A
44 println(a.m1)
5+ println(a.m2)
6+
7+ trait TraitA :
8+ private var u : String = " u"
9+ def m2 : String = u
510
611abstract class ParentA :
712 private val x : String = " x"
@@ -15,4 +20,4 @@ abstract class ParentA:
1520 def m : String = x
1621 private class B extends ParentB
1722
18- class A extends ParentA
23+ class A extends ParentA with TraitA
You can’t perform that action at this time.
0 commit comments