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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java

Issue 25373002: Issue 13584. Fix for Java/Dart local variable scoping mismatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months 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/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java
index 261ccaec87730d686007166f2cf5a44d067005c4..01c0f9a31b6c2cb32e95da865c251fa3b489f5e7 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/processor/BeautifySemanticProcessor.java
@@ -21,6 +21,7 @@ import com.google.dart.engine.ast.CompilationUnit;
import com.google.dart.engine.ast.ExpressionFunctionBody;
import com.google.dart.engine.ast.IntegerLiteral;
import com.google.dart.engine.ast.IsExpression;
+import com.google.dart.engine.ast.ListLiteral;
import com.google.dart.engine.ast.ParenthesizedExpression;
import com.google.dart.engine.ast.PrefixExpression;
import com.google.dart.engine.ast.ReturnStatement;
@@ -44,6 +45,10 @@ public class BeautifySemanticProcessor extends SemanticProcessor {
if (node.getParent() instanceof ArgumentList) {
return true;
}
+ // list literal element
+ if (node.getParent() instanceof ListLiteral) {
+ return true;
+ }
// RHS of assignment
if (node.getParent() instanceof AssignmentExpression) {
AssignmentExpression assignment = (AssignmentExpression) node.getParent();

Powered by Google App Engine
This is Rietveld 408576698