File tree 1 file changed +8
-11
lines changed
compiler/src/dotty/tools/dotc/transform
1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,13 @@ object Recheck:
33
33
34
34
val addRecheckedTypes = new TreeMap :
35
35
override def transform (tree : Tree )(using Context ): Tree =
36
- val tree1 = super .transform(tree)
37
- tree.getAttachment(RecheckedType ) match
38
- case Some (tpe) => tree1.withType(tpe)
39
- case None => tree1
36
+ try
37
+ val tree1 = super .transform(tree)
38
+ tree.getAttachment(RecheckedType ) match
39
+ case Some (tpe) => tree1.withType(tpe)
40
+ case None => tree1
41
+ catch
42
+ case _:TypeError => tree
40
43
41
44
extension (sym : Symbol )(using Context )
42
45
@@ -618,13 +621,7 @@ abstract class Recheck extends Phase, SymTransformer:
618
621
override def show (tree : untpd.Tree )(using Context ): String =
619
622
atPhase(thisPhase):
620
623
withMode(Mode .Printing ):
621
- val ttree0 = tree.asInstanceOf [tpd.Tree ]
622
- val ttree1 =
623
- try
624
- addRecheckedTypes.transform(ttree0)
625
- catch
626
- case _:TypeError => ttree0
627
- super .show(ttree1)
624
+ super .show(addRecheckedTypes.transform(tree.asInstanceOf [tpd.Tree ]))
628
625
end Recheck
629
626
630
627
/** A class that can be used to test basic rechecking without any customaization */
You can’t perform that action at this time.
0 commit comments