Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java

Issue 57643006: Issue 13023. Fix for parsing 'static int operator = (5);'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
index 769e0173b0d58ff028c55b70cae975c34f2399cf..910c2d99d49fcb94d01c83ed616c9ae62b6ced7c 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
@@ -943,6 +943,20 @@ public class SimpleParserTest extends ParserTestCase {
assertNotNull(variable.getName());
}
+ public void test_parseClassMember_field_namedOperator_withAssignment() throws Exception {
+ FieldDeclaration field = parse("parseClassMember", new Object[] {"C"}, "var operator = (5);");
+ assertNull(field.getDocumentationComment());
+ assertSize(0, field.getMetadata());
+ assertNull(field.getStaticKeyword());
+ VariableDeclarationList list = field.getFields();
+ assertNotNull(list);
+ NodeList<VariableDeclaration> variables = list.getVariables();
+ assertSize(1, variables);
+ VariableDeclaration variable = variables.get(0);
+ assertNotNull(variable.getName());
+ assertNotNull(variable.getInitializer());
+ }
+
public void test_parseClassMember_field_namedSet() throws Exception {
FieldDeclaration field = parse("parseClassMember", new Object[] {"C"}, "var set;");
assertNull(field.getDocumentationComment());

Powered by Google App Engine
This is Rietveld 408576698