From 9dd4aec79b8d05211a77c929ad6684b7e1d89c58 Mon Sep 17 00:00:00 2001 From: AlexSikia Date: Mon, 11 May 2015 17:03:55 +0200 Subject: Fix unset tree position Debugs some cases where `tree.pos` wasn't initialised properly. --- src/dotty/tools/dotc/transform/TypeTestsCasts.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/transform/TypeTestsCasts.scala b/src/dotty/tools/dotc/transform/TypeTestsCasts.scala index d7fa9feaf..1be0ef39b 100644 --- a/src/dotty/tools/dotc/transform/TypeTestsCasts.scala +++ b/src/dotty/tools/dotc/transform/TypeTestsCasts.scala @@ -50,7 +50,7 @@ trait TypeTestsCasts { if (expr.tpe <:< argType) Literal(Constant(true)) withPos tree.pos else if (argCls.isPrimitiveValueClass) - if (qualCls.isPrimitiveValueClass) Literal(Constant(qualCls == argCls)) + if (qualCls.isPrimitiveValueClass) Literal(Constant(qualCls == argCls)) withPos tree.pos else transformIsInstanceOf(expr, defn.boxedClass(argCls).typeRef) else argType.dealias match { case _: SingletonType => -- cgit v1.2.3