aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeInfo.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r--src/dotty/tools/dotc/ast/TreeInfo.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala
index e1715ae26..8957d8813 100644
--- a/src/dotty/tools/dotc/ast/TreeInfo.scala
+++ b/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -7,7 +7,10 @@ import Flags._, Trees._, Types._, Contexts._
import Names._, StdNames._, NameOps._, Decorators._, Symbols._
import util.HashSet
-trait TreeInfo[T >: Untyped] { self: Trees.Instance[T] =>
+trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] =>
+
+ // Note: the <: Type constraint looks necessary (and is needed to make the file compile in dotc).
+ // But Scalac accepts the program happily without it. Need to find out why.
def unsplice[T >: Untyped](tree: Trees.Tree[T]): Trees.Tree[T] = tree.asInstanceOf[untpd.Tree] match {
case untpd.TypedSplice(tree1) => tree1.asInstanceOf[Trees.Tree[T]]