aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2017-02-23 13:06:36 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-03-08 11:19:37 +0100
commit473340064d07231c2f7893ae12ad5c4ad1b3c071 (patch)
treebd2bb597492cf74cfc0e97117717a429ff1622c7 /compiler/src/dotty/tools/dotc/transform
parent0a70e0710605f123546dad41a0b1a253bfffbcdc (diff)
downloaddotty-473340064d07231c2f7893ae12ad5c4ad1b3c071.tar.gz
dotty-473340064d07231c2f7893ae12ad5c4ad1b3c071.tar.bz2
dotty-473340064d07231c2f7893ae12ad5c4ad1b3c071.zip
Fix #2024: TypeApply can be a final apply of a recursive method.
nullary methods with type parameters were handled wrongly, which led to absence of type application and a cryptic error message.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/TailRec.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/TailRec.scala b/compiler/src/dotty/tools/dotc/transform/TailRec.scala
index aa0845605..8a695bf22 100644
--- a/compiler/src/dotty/tools/dotc/transform/TailRec.scala
+++ b/compiler/src/dotty/tools/dotc/transform/TailRec.scala
@@ -325,6 +325,10 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
else
rewriteApply(tree, meth)
+ case TypeApply(fun, targs) =>
+ val meth = fun.symbol
+ rewriteApply(tree, meth)
+
case tree@Block(stats, expr) =>
tpd.cpy.Block(tree)(
noTailTransforms(stats),