diff options
Diffstat (limited to 'src/continuations/plugin')
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala b/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala index a09772d236..5bad9e960c 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala @@ -234,8 +234,11 @@ abstract class SelectiveANFTransform extends PluginComponent with Transform with case Typed(expr0, tpt) => // TODO: should x: A @cps[B,C] have a special meaning? + // type casts used in different ways (see match2.scala, #3199) val (stms, expr, spc) = transInlineValue(expr0, cpsA) - val tpt1 = treeCopy.TypeTree(tpt).setType(removeAllCPSAnnotations(tpt.tpe)) + val tpt1 = if (treeInfo.isWildcardStarArg(tree)) tpt else + treeCopy.TypeTree(tpt).setType(removeAllCPSAnnotations(tpt.tpe)) +// (stms, updateSynthFlag(treeCopy.Typed(tree, expr, tpt1)), spc) (stms, treeCopy.Typed(tree, expr, tpt1).setType(removeAllCPSAnnotations(tree.tpe)), spc) case TypeApply(fun, args) => |