Skip to content

Commit

Permalink
Merge pull request #10 from scala/backport-lts-3.3-21678
Browse files Browse the repository at this point in the history
Backport "Let show behave more robustly for Recheck" to LTS
  • Loading branch information
WojciechMazur authored Dec 6, 2024
2 parents 0150109 + 15e4ee0 commit 525bcd0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions compiler/src/dotty/tools/dotc/transform/Recheck.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ object Recheck:

val addRecheckedTypes = new TreeMap:
override def transform(tree: Tree)(using Context): Tree =
val tree1 = super.transform(tree)
tree.getAttachment(RecheckedType) match
case Some(tpe) => tree1.withType(tpe)
case None => tree1
try
val tree1 = super.transform(tree)
tree.getAttachment(RecheckedType) match
case Some(tpe) => tree1.withType(tpe)
case None => tree1
catch
case _:TypeError => tree

extension (sym: Symbol)

Expand Down

0 comments on commit 525bcd0

Please sign in to comment.