From 6018c2b18c974b0d103c8f0bc671e80ff13f6ccc Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Wed, 29 May 2019 20:45:08 +0200 Subject: [PATCH] Fix missing position exception Otherwise, the compile crashes when there are macros. Encountered in testing ScalaTest macros. --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index 365dac55f80e..f6ec2704b967 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -918,7 +918,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { Typed(tree, TypeTree(defn.AnyRefType)) } else tree.ensureConforms(defn.ObjectType) - receiver.select(defn.Object_ne).appliedTo(nullLiteral) + receiver.select(defn.Object_ne).appliedTo(nullLiteral).withSpan(tree.span) } /** If inititializer tree is `_', the default value of its type,