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

Side by Side Diff: frog/tests/leg_only/src/CompileTimeConstant4Test.dart

Issue 9427012: Allow binary operators on compile-time-constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file.wq Created 8 years, 10 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 | « frog/leg/warnings.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 final x = "foo";
6 final y = "foo";
7 final g1 = x + "bar";
8 final g2 = x
9 + null /// 01: compile-time error
10 ;
11 final g3 = x
12 + 499 /// 02: compile-time error
13 ;
14 final g4 = x
15 + 3.3 /// 03: compile-time error
16 ;
17 final g5 = x
18 + true /// 04: compile-time error
19 ;
20 final g6 = x
21 + false /// 05: compile-time error
22 ;
23 final g7 = "foo"
24 + x[0]; /// 06: compile-time error
25 ;
26 final g8 = 1
27 + x.length /// 07: compile-time error
28 ;
29 final g9 = x == y;
30
31 use(x) => x;
32
33 main() {
34 Expect.equals("foobar", g1);
35 Expect.isTrue(g9);
36 use(g2);
37 use(g3);
38 use(g4);
39 use(g5);
40 use(g6);
41 use(g7);
42 use(g8);
43 }
OLDNEW
« no previous file with comments | « frog/leg/warnings.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698