Skip to content

Commit ff63727

Browse files
committed
Fix HK new decompilation
1 parent e57e4c0 commit ff63727

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/src/scala/tasty/reflect/Printers.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ trait Printers
593593
printParent(fun)
594594
if (!args.isEmpty || needEmptyParens)
595595
inParens(printTrees(args, ", "))
596-
case IsTerm(Term.Select(Term.New(tpt), _)) =>
597-
printTypeTree(tpt)
596+
case IsTerm(Term.Select(Term.IsNew(newTree), _)) =>
597+
printType(newTree.tpe)
598598
case IsTerm(parent) =>
599599
throw new MatchError(parent.show)
600600
}
@@ -772,9 +772,9 @@ trait Printers
772772
}
773773
this += "this"
774774

775-
case Term.New(tpt) =>
775+
case Term.IsNew(tree) =>
776776
this += "new "
777-
printTypeTree(tpt)
777+
printType(tree.tpe)
778778

779779
case Term.NamedArg(name, arg) =>
780780
this += name += " = "

tests/run-with-compiler/i3847-b.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
new scala.Array[scala.List[scala.Int]](1)
1+
new scala.Array[scala.collection.immutable.List[scala.Int]](1)

0 commit comments

Comments
 (0)