diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-03-02 08:34:30 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-03-02 08:34:30 +0000 |
commit | 614ebd7eea86f1e83052638acde0c24c8d47b619 (patch) | |
tree | c7bac3128313a7f0c2af79e780c799906f9f1048 /src | |
parent | 32176ac4d37daeb235d622d4c4081b7b0fdb43f6 (diff) | |
download | scala-614ebd7eea86f1e83052638acde0c24c8d47b619.tar.gz scala-614ebd7eea86f1e83052638acde0c24c8d47b619.tar.bz2 scala-614ebd7eea86f1e83052638acde0c24c8d47b619.zip |
Fixed a problem with the application of Java an...
Fixed a problem with the application of Java annotations with default
values
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 40012423a9..4022c475d2 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -661,7 +661,7 @@ abstract class ClassfileParser { in.skip(attrLen) } } - def parseTaggedConstant(): Constant = { + def parseTaggedConstant: Constant = { val tag = in.nextByte val index = in.nextChar tag match { @@ -685,7 +685,7 @@ abstract class ClassfileParser { case ARRAY_TAG => val arr = new ArrayBuffer[Constant]() for (val i <- 0 until index) { - arr += parseTaggedConstant() + arr += parseTaggedConstant } new ArrayConstant(arr.toArray, appliedType(definitions.ArrayClass.typeConstructor, List(arr(0).tpe))) @@ -700,7 +700,7 @@ abstract class ClassfileParser { val nvpairs = new ListBuffer[(Name,Constant)] for (val i <- 0 until nargs) { val name = pool.getName(in.nextChar) - nvpairs += (name, parseTaggedConstant()) + nvpairs += (name, parseTaggedConstant) } sym.attributes = AttrInfo(attrType, List(), nvpairs.toList) :: sym.attributes } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 4c921da9c2..fbf78cbe7d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1602,7 +1602,7 @@ trait Typers requires Analyzer { } } for (val name <- names) { - if (!name.attributes.contains((AnnotationDefaultAttr.tpe, List(), List()))) { + if (!name.attributes.contains(AttrInfo(AnnotationDefaultAttr.tpe, List(), List()))) { error(constr.pos, "attribute " + annType.symbol.fullNameString + " is missing element " + name.name) } } |