File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed
library/src/scala/tasty/util Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change @@ -316,10 +316,13 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
316
316
this += " ]"
317
317
}
318
318
319
- case Term .Super (qual, tptOpt) =>
320
- printTree(qual)
321
- this += " .super"
322
- // TODO use tptOpt?
319
+ case Term .Super (qual, idOpt) =>
320
+ this += " super"
321
+ for (id <- idOpt) {
322
+ val Id (name) = id
323
+ this += " [" += name += " ]"
324
+ }
325
+ this
323
326
324
327
case Term .Typed (term, tpt) =>
325
328
tpt.tpe match {
Original file line number Diff line number Diff line change
1
+ /** Decompiled from out/posTestFromTasty/pos/simpleSuper/foo/A.class */
2
+ package foo {
3
+ class A() {
4
+ def foo: scala.Int = 1
5
+ }
6
+ }
7
+ /** Decompiled from out/posTestFromTasty/pos/simpleSuper/foo/B.class */
8
+ package foo {
9
+ trait B() extends java.lang.Object {
10
+ def foo: scala.Int = 2
11
+ }
12
+ }
13
+ /** Decompiled from out/posTestFromTasty/pos/simpleSuper/foo/C.class */
14
+ package foo {
15
+ class C() extends foo.A() with foo.B {
16
+ override def foo: scala.Int = super.foo.+(super[B].foo)
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ package foo
2
+
3
+ class A {
4
+ def foo : Int = 1
5
+ }
6
+
7
+ trait B {
8
+ def foo : Int = 2
9
+ }
10
+
11
+ class C extends A with B {
12
+ override def foo : Int = super .foo + super [B ].foo
13
+ }
You can’t perform that action at this time.
0 commit comments