diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-21 11:50:52 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-21 11:50:52 +0100 |
commit | b49bba08633c216175095effab71dac2a133a0c3 (patch) | |
tree | fd9e1f1fcbf0973561b66097731ac083c74a9d29 /src/dotty/tools/dotc | |
parent | fd76c38000f206b3d27ac68eaeddb0f76678dfc2 (diff) | |
download | dotty-b49bba08633c216175095effab71dac2a133a0c3.tar.gz dotty-b49bba08633c216175095effab71dac2a133a0c3.tar.bz2 dotty-b49bba08633c216175095effab71dac2a133a0c3.zip |
ClassfileParser: apply scala commit f91242c6959471b6c463538be
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 012fc7af3..a7620bd9f 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -392,9 +392,16 @@ class ClassfileParser( case ENUM_TAG => val t = pool.getType(index) val n = pool.getName(in.nextChar) - val s = t.typeSymbol.companionModule.decls.lookup(n) - assert(s != NoSymbol, t) - if (skip) None else Some(Literal(Constant(s))) + val module = t.typeSymbol.companionModule + val s = module.info.decls.lookup(n) + if (skip) { + None + } else if (s != NoSymbol) { + Some(Literal(Constant(s))) + } else { + ctx.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[Tree]() var hasError = false |