diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-20 10:58:18 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-03-30 09:51:02 +0200 |
commit | e7e81d00fe701245f1bc16aff630a67260665cdd (patch) | |
tree | ae5328782e63117af477e1b9bf67887ce10e422e /src/dotty/tools/dotc/transform/VCInlineMethods.scala | |
parent | a44082fd7d97e7adb839540d770b5f77b4a150a1 (diff) | |
download | dotty-e7e81d00fe701245f1bc16aff630a67260665cdd.tar.gz dotty-e7e81d00fe701245f1bc16aff630a67260665cdd.tar.bz2 dotty-e7e81d00fe701245f1bc16aff630a67260665cdd.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/transform/VCInlineMethods.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/VCInlineMethods.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |