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

Unified Diff: tests/language/const_for_in_variable_test.dart

Issue 1503063002: Handle const loop variable. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years 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 | « pkg/compiler/lib/src/resolution/variables.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/const_for_in_variable_test.dart
diff --git a/tests/language/call_function_apply_test.dart b/tests/language/const_for_in_variable_test.dart
similarity index 58%
copy from tests/language/call_function_apply_test.dart
copy to tests/language/const_for_in_variable_test.dart
index 935cfaf832aff599478847534822d651a4ddcd51..a12cd556cd40553244c0dc34efe73cc8e6b4fa03 100644
--- a/tests/language/call_function_apply_test.dart
+++ b/tests/language/const_for_in_variable_test.dart
@@ -2,14 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import "package:expect/expect.dart";
-
-class A {
- call({a: 42}) {
- return 499 + a;
- }
-}
-
main() {
- Expect.equals(497, Function.apply(new A(), [], {#a: -2}));
-}
+ for(
+ const /// 01: compile-time error
+ final /// 02: ok
+ int x in const [1, 2, 3]) {
+ break;
+ }
+}
« no previous file with comments | « pkg/compiler/lib/src/resolution/variables.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698