File tree 3 files changed +12
-3
lines changed
library/src/scala/tasty/reflect 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -809,7 +809,7 @@ trait Printers
809
809
case Term .Apply (fn, args) =>
810
810
fn match {
811
811
case Term .Select (Term .This (_), " <init>" ) => this += " this" // call to constructor inside a constructor
812
- case _ => printTree (fn)
812
+ case _ => printQualTree (fn)
813
813
}
814
814
val args1 = args match {
815
815
case init :+ Term .Typed (Term .Repeated (Nil , _), _) => init // drop empty var args at the end
@@ -819,7 +819,7 @@ trait Printers
819
819
inParens(printTrees(args1, " , " ))
820
820
821
821
case Term .TypeApply (fn, args) =>
822
- printTree (fn)
822
+ printQualTree (fn)
823
823
fn match {
824
824
case Term .Select (Term .New (TypeTree .Applied (_, _)), " <init>" ) =>
825
825
// type bounds already printed in `fn`
@@ -894,7 +894,7 @@ trait Printers
894
894
printTree(elsep)
895
895
896
896
case Term .Match (selector, cases) =>
897
- printTree (selector)
897
+ printQualTree (selector)
898
898
this += highlightKeyword(" match" , color)
899
899
inBlock(printCases(cases, lineBreak()))
900
900
Original file line number Diff line number Diff line change @@ -7,4 +7,10 @@ class Test() {
7
7
}).map[scala.Int](((v: scala.Int) => v.+(1)))
8
8
val v4: java.lang.String = (while (true) ()).toString()
9
9
def v5: scala.Option[scala.Predef.String] = scala.Some.apply[java.lang.String]((return scala.Some.apply[java.lang.String]("a")).toString())
10
+ def foo(x: scala.Boolean): scala.Boolean = x.unary_!
11
+ def bar(): scala.Int = (if (true) 1 else 2) match {
12
+ case x =>
13
+ (x: scala.Int)
14
+ }
15
+ def baz(): scala.Any = (if (true) ((x: scala.Any) => scala.Predef.identity[scala.Any](x)) else ((x: scala.Any) => scala.Predef.identity[scala.Any](x))).apply(0)
10
16
}
Original file line number Diff line number Diff line change @@ -4,4 +4,7 @@ class Test {
4
4
val v3 = (1 match { case _ => Some (1 ) }).map(v => v+ 1 )
5
5
val v4 = (while (true ) ()).toString
6
6
def v5 : Option [String ] = Some ((return Some (" a" )).toString)
7
+ def foo (x : Boolean ) = ! x
8
+ def bar () = (if true then 1 else 2 ) match { case x => x }
9
+ def baz () = (if true then identity else identity)(0 )
7
10
}
You can’t perform that action at this time.
0 commit comments