Skip to content

Commit 14d20d9

Browse files
committed
Revert "Workaround #840"
This reverts commit acd7b9d.
1 parent c787fe1 commit 14d20d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/TypeTestsCasts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trait TypeTestsCasts {
4747

4848
def transformIsInstanceOf(expr:Tree, argType: Type): Tree = {
4949
def argCls = argType.classSymbol
50-
if (false && expr.tpe <:< argType)
50+
if ((expr.tpe <:< argType) && isPureExpr(expr))
5151
Literal(Constant(true)) withPos tree.pos
5252
else if (argCls.isPrimitiveValueClass)
5353
if (qualCls.isPrimitiveValueClass) Literal(Constant(qualCls == argCls)) withPos tree.pos

0 commit comments

Comments
 (0)