Skip to content

Commit 92e13fe

Browse files
committed
SelectStatic: retain symbols on overloaded selects
1 parent 67bb2f7 commit 92e13fe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dotty/tools/dotc/transform/SelectStatic.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import dotty.tools.dotc.transform.TreeTransforms._
1313
/** Removes selects that would be compiled into GetStatic
1414
* otherwise backend needs to be aware that some qualifiers need to be dropped.
1515
* Similar transformation seems to be performed by flatten in nsc
16-
*
1716
* @author Dmytro Petrashko
1817
*/
1918
class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { thisTransform =>
@@ -43,7 +42,7 @@ class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { th
4342

4443
private def normalize(t: Tree)(implicit ctx: Context) = t match {
4544
case Select(Block(stats, qual), nm) =>
46-
Block(stats, Select(qual, nm))
45+
Block(stats, cpy.Select(t)(qual, nm))
4746
case Apply(Block(stats, qual), nm) =>
4847
Block(stats, Apply(qual, nm))
4948
case TypeApply(Block(stats, qual), nm) =>

0 commit comments

Comments
 (0)