From e7e81d00fe701245f1bc16aff630a67260665cdd Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 20 Mar 2016 10:58:18 +0100 Subject: Fix type-shifting problem in vcInlineMethods vcInlineMethods could produce a different type on rewire which led to a -Ycheck failure. We now insert a cast when that happens. Test case: pos/flowops1.scala with -Ycheck:vcInline. --- src/dotty/tools/dotc/transform/VCInlineMethods.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/transform/VCInlineMethods.scala') diff --git a/src/dotty/tools/dotc/transform/VCInlineMethods.scala b/src/dotty/tools/dotc/transform/VCInlineMethods.scala index 1c2b015a1..ddd414417 100644 --- a/src/dotty/tools/dotc/transform/VCInlineMethods.scala +++ b/src/dotty/tools/dotc/transform/VCInlineMethods.scala @@ -90,7 +90,7 @@ class VCInlineMethods extends MiniPhaseTransform with IdentityDenotTransformer { tree // The rewiring will be handled by a fully-applied parent node case _ => if (isMethodWithExtension(tree.symbol)) - rewire(tree) + rewire(tree).ensureConforms(tree.tpe) else tree } -- cgit v1.2.3