aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeInfo.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-06-13 21:30:54 +0200
committerMartin Odersky <odersky@gmail.com>2013-06-13 21:30:54 +0200
commita3f6a1df1bd623ee913e41f739b3f13ac9638d14 (patch)
treee93a442c6adc8da3307e03923e90a7edcda41e09 /src/dotty/tools/dotc/ast/TreeInfo.scala
parenta5f576f147d5e9272629992936ed1e45c0a05020 (diff)
downloaddotty-a3f6a1df1bd623ee913e41f739b3f13ac9638d14.tar.gz
dotty-a3f6a1df1bd623ee913e41f739b3f13ac9638d14.tar.bz2
dotty-a3f6a1df1bd623ee913e41f739b3f13ac9638d14.zip
Dropping type parameters from typed TypeDefs.
Typed TypeDefs no longer carry tparams. Untyped ones still do, but there is a special PolyTypeDef node for them in untpd. Also, fixed flatten and DeSugarTest to deal with new tree desugarings which are not idempotent (e.g. desugar.classDef, or desugar.valDef).
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r--src/dotty/tools/dotc/ast/TreeInfo.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala
index cfb175e0b..11d50fc1b 100644
--- a/src/dotty/tools/dotc/ast/TreeInfo.scala
+++ b/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -17,7 +17,7 @@ abstract class TreeInfo {
def isDeclarationOrTypeDef(tree: Tree[_ >: Untyped]): Boolean = tree match {
case DefDef(_, _, _, _, _, EmptyTree)
| ValDef(_, _, _, EmptyTree)
- | TypeDef(_, _, _, _) => true
+ | TypeDef(_, _, _) => true
case _ => false
}
@@ -26,7 +26,7 @@ abstract class TreeInfo {
def isInterfaceMember(tree: Tree[_ >: Untyped]): Boolean = tree match {
case EmptyTree => true
case Import(_, _) => true
- case TypeDef(_, _, _, _) => true
+ case TypeDef(_, _, _) => true
case DefDef(mods, _, _, _, _, __) => mods.flags is Deferred
case ValDef(mods, _, _, _) => mods is Deferred
case _ => false
@@ -38,7 +38,7 @@ abstract class TreeInfo {
def isIdempotentDef(tree: Tree[Type])(implicit ctx: Context): Boolean = tree match {
case EmptyTree
| ClassDef(_, _, _)
- | TypeDef(_, _, _, _)
+ | TypeDef(_, _, _)
| Import(_, _)
| DefDef(_, _, _, _, _, _) =>
true
@@ -232,7 +232,7 @@ abstract class TreeInfo {
}
def isEarlyTypeDef(tree: Tree[_ >: Untyped]) = tree match {
- case TypeDef(mods, _, _, _) => mods is Scala2PreSuper
+ case TypeDef(mods, _, _) => mods is Scala2PreSuper
case _ => false
}