summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/TreeGen.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-01-15 16:48:56 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-01-16 10:35:09 -0800
commit77dffe4aa79b414ab3f3a0a24c34140f1bbd6024 (patch)
tree9f737ea5aff9db636e5c01b3792c675463957b43 /src/compiler/scala/tools/nsc/ast/TreeGen.scala
parentef332d2a265ab86a6ec415be61b7896a83068bca (diff)
parent6f3ea77870ab5e17805ef0fc338c251e87870b8c (diff)
downloadscala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.gz
scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.bz2
scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.zip
Merge branch '2.10.x'
Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala src/swing/scala/swing/SwingActor.scala src/swing/scala/swing/SwingWorker.scala test/files/run/t6955.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeGen.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeGen.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeGen.scala b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
index af874ed28c..b9eb511a9a 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeGen.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
@@ -162,6 +162,11 @@ abstract class TreeGen extends scala.reflect.internal.TreeGen with TreeDSL {
}
}
+ // drop annotations generated by CPS plugin etc, since its annotationchecker rejects T @cps[U] <: Any
+ // let's assume for now annotations don't affect casts, drop them there, and bring them back using the outer Typed tree
+ def mkCastPreservingAnnotations(tree: Tree, pt: Type) =
+ Typed(mkCast(tree, pt.withoutAnnotations.dealias), TypeTree(pt))
+
/** Generate a cast for tree Tree representing Array with
* elem type elemtp to expected type pt.
*/