We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ac70b6 commit d5cc914Copy full SHA for d5cc914
src/dotty/tools/dotc/transform/TreeTransform.scala
@@ -1141,7 +1141,11 @@ object TreeTransforms {
1141
if (mutatedInfo eq null) tree
1142
else {
1143
val expr = transform(tree.expr, mutatedInfo, cur)
1144
- val from = transform(tree.from, mutatedInfo, cur)
+ val from = tree.from
1145
+ // don't thansform the `from` part, as this is not a normal ident, but
1146
+ // a pointer to the enclosing method. Transforming this as a normal ident
1147
+ // can go wrong easily. If a transformation is needed, it should be
1148
+ // the responsibility of the transformReturn method to handle this also.
1149
goReturn(cpy.Return(tree)(expr, from), mutatedInfo.nx.nxTransReturn(cur))
1150
}
1151
case tree: Try =>
0 commit comments