diff options
author | Stephan Herrmann | 2010-09-28 14:52:23 +0000 |
---|---|---|
committer | Stephan Herrmann | 2010-09-28 14:52:23 +0000 |
commit | 14384301beb5954622a33f1934563736d51dce5d (patch) | |
tree | 1a32e696aec28a5ba0c449de75cded2fac6840f3 | |
parent | ee68bea1b204f98c26c0215a8574a6e928f6c645 (diff) | |
download | org.eclipse.objectteams-14384301beb5954622a33f1934563736d51dce5d.tar.gz org.eclipse.objectteams-14384301beb5954622a33f1934563736d51dce5d.tar.xz org.eclipse.objectteams-14384301beb5954622a33f1934563736d51dce5d.zip |
fixed a merge error: chunk ended up in the wrong method, caused regression in SyntaxErrorTest.test14()
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java index 8081de3ef..4dc71dade 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java @@ -1419,17 +1419,6 @@ protected void consumeAnnotationTypeDeclaration() { //convert constructor that do not have the type's name into methods typeDecl.checkConstructors(this); - - // https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713, - // reject initializers that have been tolerated by the grammar. - FieldDeclaration [] fields = typeDecl.fields; - int fieldCount = fields == null ? 0 : fields.length; - for (int i = 0; i < fieldCount; i++) { - FieldDeclaration field = fields[i]; - if (field instanceof Initializer) { - problemReporter().interfaceCannotHaveInitializers(typeDecl.name, field); - } - } //always add <clinit> (will be remove at code gen time if empty) if (this.scanner.containsAssertKeyword) { @@ -4915,6 +4904,17 @@ protected void consumeInterfaceDeclaration() { //convert constructor that do not have the type's name into methods typeDecl.checkConstructors(this); + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=212713, + // reject initializers that have been tolerated by the grammar. + FieldDeclaration [] fields = typeDecl.fields; + int fieldCount = fields == null ? 0 : fields.length; + for (int i = 0; i < fieldCount; i++) { + FieldDeclaration field = fields[i]; + if (field instanceof Initializer) { + problemReporter().interfaceCannotHaveInitializers(typeDecl.name, field); + } + } //always add <clinit> (will be remove at code gen time if empty) if (this.scanner.containsAssertKeyword) { |