From 71b900fde4cb5937c1cbb19da6e3397586e2467c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 13 Dec 2016 14:56:00 +0100 Subject: Ref copier that works for Idents and Selects The Ref copier copies Idents and Selects, changing the name of either. --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/ast/tpd.scala') diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index cd6b3fcf2..433808e8e 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -450,7 +450,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { } else foldOver(sym, tree) } - override val cpy = new TypedTreeCopier + override val cpy: TypedTreeCopier = // Type ascription needed to pick up any new members in TreeCopier (currently there are none) + new TypedTreeCopier class TypedTreeCopier extends TreeCopier { def postProcess(tree: Tree, copied: untpd.Tree): copied.ThisTree[Type] = -- cgit v1.2.3