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

Side by Side Diff: tests/language/compile_time_constant_checked2_test.dart

Issue 150223002: Add 'static type error' tags to multitests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename 'static type error' to 'checked mode compile-time error'. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/compile_time_constant_checked3_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class A { 5 class A {
6 final int x; 6 final int x;
7 const A.a1() : x = 'foo'; /// 01: continued 7 const A.a1() : x = 'foo'; /// 01: continued
8 const A.a2(this.x); 8 const A.a2(this.x);
9 const A.a3([this.x = 'foo']); /// 03: continued 9 const A.a3([this.x = 'foo']); /// 03: continued
10 const A.a4(String this.x); /// 04: continued 10 const A.a4(String this.x); /// 04: continued
11 const A.a5(String x) : this.x = x; /// 05: continued 11 const A.a5(String x) : this.x = x; /// 05: continued
12 const A.a6(int x) : this.x = x; 12 const A.a6(int x) : this.x = x;
13 } 13 }
14 14
15 const a1 = const A.a1(); /// 01: static type warning, compile-time error 15 const a1 = const A.a1(); /// 01: static type warning, checked mode compile-time error
16 const a2 = const A.a2('foo'); /// 02: static type warning, compile-time error 16 const a2 = const A.a2('foo'); /// 02: static type warning, checked mode compile- time error
17 const a3 = const A.a3(); /// 03: static type warning, compile-time error 17 const a3 = const A.a3(); /// 03: static type warning, checked mode compile-time error
18 const a4 = const A.a4('foo'); /// 04: static type warning, compile-time error 18 const a4 = const A.a4('foo'); /// 04: static type warning, checked mode compile- time error
19 const a5 = const A.a5('foo'); /// 05: static type warning, compile-time error 19 const a5 = const A.a5('foo'); /// 05: static type warning, checked mode compile- time error
20 const a6 = const A.a6('foo'); /// 06: static type warning, compile-time error 20 const a6 = const A.a6('foo'); /// 06: static type warning, checked mode compile- time error
21 21
22 main() { 22 main() {
23 print(a1); /// 01: continued 23 print(a1); /// 01: continued
24 print(a2); /// 02: continued 24 print(a2); /// 02: continued
25 print(a3); /// 03: continued 25 print(a3); /// 03: continued
26 print(a4); /// 04: continued 26 print(a4); /// 04: continued
27 print(a5); /// 05: continued 27 print(a5); /// 05: continued
28 print(a6); /// 06: continued 28 print(a6); /// 06: continued
29 } 29 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/compile_time_constant_checked3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698