| Index: dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| ===================================================================
|
| --- dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java (revision 30037)
|
| +++ dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java (working copy)
|
| @@ -3158,6 +3158,24 @@
|
| assertErrors(source, CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION);
|
| }
|
|
|
| + public void test_referencedBeforeDeclaration_inInitializer_closure() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "main() {",
|
| + " var v = () => v;",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION);
|
| + }
|
| +
|
| + public void test_referencedBeforeDeclaration_inInitializer_directly() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "main() {",
|
| + " var v = v;",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(source, CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION);
|
| + }
|
| +
|
| public void test_rethrowOutsideCatch() throws Exception {
|
| Source source = addSource(createSource(//
|
| "f() {",
|
|
|