aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-02-19 16:22:04 +0100
committerMartin Odersky <odersky@gmail.com>2013-02-19 16:22:04 +0100
commitb72ee12e9eeffe32ffd752c5aaf9ef1713d77286 (patch)
tree0a6bf27e6251ad4d2f62ca91a470ef57a4faafa0 /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
parentc1ece3bd0bd67e69c13f5529b02061aaa8330b9a (diff)
downloaddotty-b72ee12e9eeffe32ffd752c5aaf9ef1713d77286.tar.gz
dotty-b72ee12e9eeffe32ffd752c5aaf9ef1713d77286.tar.bz2
dotty-b72ee12e9eeffe32ffd752c5aaf9ef1713d77286.zip
Making TypedTrees a full alternative to Trees
TypedTrees now has the full functionality of Trees. The idea is that a client should inherit from either Trees or TypedTrees, and the rest follows automatically.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index 2507d277b..d131fe8f8 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -4,7 +4,7 @@ package core
package pickling
import Contexts._, Symbols._, Types._, Names._, StdNames._, NameOps._, Scopes._, Decorators._
-import SymDenotations._, UnPickler._, Constants._, Trees._, Annotations._, Positions._
+import SymDenotations._, UnPickler._, Constants._, Annotations._, Positions._
import TypedTrees._
import java.io.{ File, IOException }
import java.lang.Integer.toHexString
@@ -348,7 +348,7 @@ class ClassfileParser(
if (ownTypeParams.isEmpty) tpe else TempPolyType(ownTypeParams, tpe)
} // sigToType
- def parseAnnotArg(skip: Boolean = false): Option[TypedTree] = {
+ def parseAnnotArg(skip: Boolean = false): Option[Tree] = {
val tag = in.nextByte.toChar
val index = in.nextChar
tag match {
@@ -366,7 +366,7 @@ class ClassfileParser(
assert(s != NoSymbol, t)
if (skip) None else Some(makeLiteralAnnotArg(Constant(s)))
case ARRAY_TAG =>
- val arr = new ArrayBuffer[TypedTree]()
+ val arr = new ArrayBuffer[Tree]()
var hasError = false
for (i <- 0 until index)
parseAnnotArg(skip) match {
@@ -386,12 +386,12 @@ class ClassfileParser(
def parseAnnotation(attrNameIndex: Char, skip: Boolean = false): Option[Annotation] = try {
val attrType = pool.getType(attrNameIndex)
val nargs = in.nextChar
- val argbuf = new ListBuffer[TypedTree]
+ val argbuf = new ListBuffer[Tree]
var hasError = false
for (i <- 0 until nargs) {
val name = pool.getName(in.nextChar)
parseAnnotArg(skip) match {
- case Some(arg) => argbuf += tpd.NamedArg(name, arg)
+ case Some(arg) => argbuf += NamedArg(name, arg)
case None => hasError = !skip
}
}
@@ -436,8 +436,8 @@ class ClassfileParser(
case tpnme.BridgeATTR =>
sym.setFlag(Flags.Bridge)
case tpnme.DeprecatedATTR =>
- val msg = tpd.Literal(Constant("see corresponding Javadoc for more information."))
- val since = tpd.Literal(Constant(""))
+ val msg = Literal(Constant("see corresponding Javadoc for more information."))
+ val since = Literal(Constant(""))
sym.addAnnotation(Annotation(defn.DeprecatedAnnot, msg, since))
case tpnme.ConstantValueATTR =>
val c = pool.getConstant(in.nextChar)