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

Unified Diff: tests/language/constant_type_literal_test.dart

Issue 25535009: Add const type literal test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comment. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/constant_type_literal_test.dart
diff --git a/tests/language/function_subtype_local6_test.dart b/tests/language/constant_type_literal_test.dart
similarity index 55%
copy from tests/language/function_subtype_local6_test.dart
copy to tests/language/constant_type_literal_test.dart
index 95817d18cce92392f418e2a8e59d30c58a5a54fc..a63ec1b60b4c41f2d0889a95ec8506272c8c16ff 100644
--- a/tests/language/function_subtype_local6_test.dart
+++ b/tests/language/constant_type_literal_test.dart
@@ -1,17 +1,17 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// 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.
-// Dart test program for constructors and initializers.
-// VMOptions=--no-eliminate-type-checks
-// Regression test for issue 12127.
+// Test for type literals as compile-time constants.
class C<T> {
- void test() {
- void foo(T a) {}
+ void m() {
+ const List lst = const [
+ T /// 01: compile-time error
+ ];
}
}
main() {
- new C<bool>().test();
+ new C().m();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698