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

Unified Diff: tests/language/ref_before_declaration_test.dart

Issue 49253006: Compile time error on forward references to functions (Closed) Base URL: http://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
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/ref_before_declaration_test.dart
===================================================================
--- tests/language/ref_before_declaration_test.dart (revision 29827)
+++ tests/language/ref_before_declaration_test.dart (working copy)
@@ -41,10 +41,22 @@
const y = "Honk if you like peace and quiet!"; /// 03: compile-time error
}
+ void test4() {
+ void Q() {
+ P(); // Refers to non-existing top-level function P
+ }
+ void P() { /// 06: compile-time error
+ Q(); /// 06: continued
+ } /// 06: continued
+
+ Function f = () {x = f;}; /// 07: compile-time error
+ }
+
test() {
test1();
test2();
test3();
+ test4();
}
}
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698