From 92e13fe00f2bef5dc8ef5c46583aa745b04a6bc1 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 9 Aug 2016 18:28:20 +0200 Subject: SelectStatic: retain symbols on overloaded selects --- src/dotty/tools/dotc/transform/SelectStatic.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/transform/SelectStatic.scala b/src/dotty/tools/dotc/transform/SelectStatic.scala index a517b1856..0cb054b1c 100644 --- a/src/dotty/tools/dotc/transform/SelectStatic.scala +++ b/src/dotty/tools/dotc/transform/SelectStatic.scala @@ -13,7 +13,6 @@ import dotty.tools.dotc.transform.TreeTransforms._ /** Removes selects that would be compiled into GetStatic * otherwise backend needs to be aware that some qualifiers need to be dropped. * Similar transformation seems to be performed by flatten in nsc - * * @author Dmytro Petrashko */ class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { thisTransform => @@ -43,7 +42,7 @@ class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { th private def normalize(t: Tree)(implicit ctx: Context) = t match { case Select(Block(stats, qual), nm) => - Block(stats, Select(qual, nm)) + Block(stats, cpy.Select(t)(qual, nm)) case Apply(Block(stats, qual), nm) => Block(stats, Apply(qual, nm)) case TypeApply(Block(stats, qual), nm) => -- cgit v1.2.3