From 9772ec8b2f15fd8c2971413d90006beb8bf0d2b7 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 29 Aug 2013 08:29:26 +0200 Subject: typedAnnotated no longer emits nulls Adds a null-check in original synthesis for the result of typedAnnotated. Previously it was possible for the aforementioned result to look like TypeTree() setOriginal Annotated(..., null). Not anymore. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index bf2170310f..e27f540a7d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4107,7 +4107,7 @@ trait Typers extends Modes with Adaptations with Tags { // we need symbol-ful originals for reification // hence we go the extra mile to hand-craft tis guy val original = arg1 match { - case tt @ TypeTree() => Annotated(ann, tt.original) + case tt @ TypeTree() if tt.original != null => Annotated(ann, tt.original) // this clause is needed to correctly compile stuff like "new C @D" or "@(inline @getter)" case _ => Annotated(ann, arg1) } -- cgit v1.2.3