summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-08-30 00:03:48 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-08-30 00:03:48 -0700
commitc60ed61f18bbc4e0b5907fc4cc726ff41dd0434b (patch)
tree0652842d15b3a2b8c9761718e6e11e258a8e3e2b /src/compiler/scala/tools/nsc/symtab
parent44b178b37698fd51afa8eed95e98b9ff7d38b8ab (diff)
parenta0da5a697a2a0841972907b66fa733ab3e0ca665 (diff)
downloadscala-c60ed61f18bbc4e0b5907fc4cc726ff41dd0434b.tar.gz
scala-c60ed61f18bbc4e0b5907fc4cc726ff41dd0434b.tar.bz2
scala-c60ed61f18bbc4e0b5907fc4cc726ff41dd0434b.zip
Merge pull request #2886 from gkossakowski/merge-2.10.x
Merge 2.10.x into master
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 14e3f5b642..2b96961291 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -874,9 +874,14 @@ abstract class ClassfileParser {
case ENUM_TAG =>
val t = pool.getType(index)
val n = readName()
- val s = t.typeSymbol.companionModule.info.decls.lookup(n)
- assert(s != NoSymbol, t)
- Some(LiteralAnnotArg(Constant(s)))
+ val module = t.typeSymbol.companionModule
+ val s = module.info.decls.lookup(n)
+ if (s != NoSymbol) Some(LiteralAnnotArg(Constant(s)))
+ else {
+ warning(s"""While parsing annotations in ${in.file}, could not find $n in enum $module.\nThis is likely due to an implementation restriction: an annotation argument cannot refer to a member of the annotated class (SI-7014).""")
+ None
+ }
+
case ARRAY_TAG =>
val arr = new ArrayBuffer[ClassfileAnnotArg]()
var hasError = false