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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java

Issue 427603002: Properly handle "#void" in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java
index 8d8c770a599341c330e66d37a11acef5c7d42856..bbdb796c17a969895d20fd41e7b00a30c7ac8df4 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/ResolverTestCase.java
@@ -167,11 +167,15 @@ public class ResolverTestCase extends EngineTestCase {
}
protected Expression findTopLevelConstantExpression(CompilationUnit compilationUnit, String name) {
+ return findTopLevelDeclaration(compilationUnit, name).getInitializer();
+ }
+
+ protected VariableDeclaration findTopLevelDeclaration(CompilationUnit compilationUnit, String name) {
for (CompilationUnitMember member : compilationUnit.getDeclarations()) {
if (member instanceof TopLevelVariableDeclaration) {
for (VariableDeclaration variable : ((TopLevelVariableDeclaration) member).getVariables().getVariables()) {
if (variable.getName().getName().equals(name)) {
- return variable.getInitializer();
+ return variable;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698