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

Unified Diff: tests/language/compile_time_constant_test.dart

Issue 11188007: Fix compile_time_constant test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Const variables must be initialized. Update analyzer status file. Created 8 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
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/compile_time_constant_test.dart
diff --git a/tests/language/compile_time_constant_test.dart b/tests/language/compile_time_constant_test.dart
index ca433394c4ad3d75b7d67b4441a5cfee55596d64..53e9198dec084c46ee8f8175ada4300a49a305ac 100644
--- a/tests/language/compile_time_constant_test.dart
+++ b/tests/language/compile_time_constant_test.dart
@@ -4,9 +4,9 @@
class Bad {
int foo;
- static int bar
- = foo /// 01: compile-time error
- ;
+ const int bar =
+ foo /// 01: compile-time error
+ -1;
static const int toto =
bar /// 02: compile-time error
-3;
@@ -15,6 +15,6 @@ class Bad {
void use(x) {}
main() {
- use(Bad.bar);
+ use(new Bad().bar);
use(Bad.toto);
}
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698