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

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

Issue 46403004: Compile time error was removed for variable reference in its initializer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 7c5bdd1adb126d5bd42227fe166629e91936eb7f..b901da3152211f48553ef7ca55f558432b18f96b 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -3130,47 +3130,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
assertErrors(source, CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION);
}
- public void test_referenceToDeclaredVariableInInitializer_closure() throws Exception {
- Source source = addSource(createSource(//
- "f() {",
- " var x = (x) {};",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER);
- verify(source);
- }
-
- public void test_referenceToDeclaredVariableInInitializer_getter() throws Exception {
- Source source = addSource(createSource(//
- "f() {",
- " int x = x + 1;",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER);
- verify(source);
- }
-
- public void test_referenceToDeclaredVariableInInitializer_setter() throws Exception {
- Source source = addSource(createSource(//
- "f() {",
- " int x = x++;",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER);
- verify(source);
- }
-
- public void test_referenceToDeclaredVariableInInitializer_unqualifiedInvocation()
- throws Exception {
- Source source = addSource(createSource(//
- "f() {",
- " var x = x();",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.REFERENCE_TO_DECLARED_VARIABLE_IN_INITIALIZER);
- verify(source);
- }
-
public void test_rethrowOutsideCatch() throws Exception {
Source source = addSource(createSource(//
"f() {",

Powered by Google App Engine
This is Rietveld 408576698