aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-02-27 09:12:27 +0100
committerMartin Odersky <odersky@gmail.com>2013-02-27 09:14:33 +0100
commit856f084c474125117ed2166720ba4192d358fbef (patch)
treebfbcc9c242dae55863ce4cd84a894fb12e34ab9f /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
parentd29cc7978daa49f68d14eba35af20fbb8dd423c1 (diff)
downloaddotty-856f084c474125117ed2166720ba4192d358fbef.tar.gz
dotty-856f084c474125117ed2166720ba4192d358fbef.tar.bz2
dotty-856f084c474125117ed2166720ba4192d358fbef.zip
Filling in all ???s
Added reporters. Added context for signatures. Implemented method signatures via erasure. Refined derivedNameType handling.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index 3a1e81e2d..8e34aa0a9 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -357,18 +357,18 @@ class ClassfileParser(
val index = in.nextChar
tag match {
case STRING_TAG =>
- if (skip) None else Some(makeLiteralAnnotArg(Constant(pool.getName(index).toString)))
+ if (skip) None else Some(Literal(Constant(pool.getName(index).toString)))
case BOOL_TAG | BYTE_TAG | CHAR_TAG | SHORT_TAG | INT_TAG |
LONG_TAG | FLOAT_TAG | DOUBLE_TAG =>
- if (skip) None else Some(makeLiteralAnnotArg(pool.getConstant(index)))
+ if (skip) None else Some(Literal(pool.getConstant(index)))
case CLASS_TAG =>
- if (skip) None else Some(makeLiteralAnnotArg(Constant(pool.getType(index))))
+ if (skip) None else Some(Literal(Constant(pool.getType(index))))
case ENUM_TAG =>
val t = pool.getType(index)
val n = pool.getName(in.nextChar)
val s = t.typeSymbol.companionModule.info.decls.lookup(n)
assert(s != NoSymbol, t)
- if (skip) None else Some(makeLiteralAnnotArg(Constant(s)))
+ if (skip) None else Some(Literal(Constant(s)))
case ARRAY_TAG =>
val arr = new ArrayBuffer[Tree]()
var hasError = false
@@ -378,9 +378,9 @@ class ClassfileParser(
case None => hasError = true
}
if (hasError) None
- else if (skip) None else Some(makeArrayAnnotArg(arr.toArray))
+ else if (skip) None else Some(SeqLiteral(arr.toList))
case ANNOTATION_TAG =>
- parseAnnotation(index, skip) map makeNestedAnnotArg
+ parseAnnotation(index, skip) map (_.tree)
}
}
@@ -656,7 +656,9 @@ class ClassfileParser(
case Some(entry) =>
val outerName = entry.outerName.stripModuleSuffix
val owner = classSymbol(outerName)
- val result = cctx.beforeTyper(getMember(owner, innerName.toTypeName))
+ val result = cctx.atPhaseNotLaterThanTyper { implicit ctx =>
+ getMember(owner, innerName.toTypeName)
+ }
assert(result ne NoSymbol,
s"""failure to resolve inner class:
|externalName = $externalName,