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

Side by Side Diff: pkg/front_end/test/fasta/rasta/type_literals.dart

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2016, 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.md file.
4
5 typedef void Func();
6
7 class C<T> {
8 test() {
9 // Note: we cannot write a type literal with generic type arguments. For
10 // example, `C<String>` isn't a valid expression.
11 C;
12 use(C);
13 dynamic;
14 use(dynamic);
15 T;
16 use(T);
17 Func;
18 use(Func);
19
20 C();
21 use(C());
22 dynamic();
23 use(dynamic());
24 T();
25 use(T());
26 Func();
27 use(Func());
28
29 C = 42;
30 use(C = 42);
31 dynamic = 42;
32 use(dynamic = 42);
33 T = 42;
34 use(T = 42);
35 Func = 42;
36 use(Func = 42);
37
38 C++;
39 use(C++);
40 dynamic++;
41 use(dynamic++);
42 T++;
43 use(T++);
44 Func++;
45 use(Func++);
46
47 ++C;
48 use(++C);
49 ++dynamic;
50 use(++dynamic);
51 ++T;
52 use(++T);
53 ++Func;
54 use(++Func);
55
56 C--;
57 use(C--);
58 dynamic--;
59 use(dynamic--);
60 T--;
61 use(T--);
62 Func--;
63 use(Func--);
64
65 --C;
66 use(--C);
67 --dynamic;
68 use(--dynamic);
69 --T;
70 use(--T);
71 --Func;
72 use(--Func);
73
74 C ??= 42;
75 use(C ??= 42);
76 dynamic ??= 42;
77 use(dynamic ??= 42);
78 T ??= 42;
79 use(T ??= 42);
80 Func ??= 42;
81 use(Func ??= 42);
82
83 C += 42;
84 use(C += 42);
85 dynamic += 42;
86 use(dynamic += 42);
87 T += 42;
88 use(T += 42);
89 Func += 42;
90 use(Func += 42);
91
92 C-= 42;
93 use(C-= 42);
94 dynamic-= 42;
95 use(dynamic-= 42);
96 T-= 42;
97 use(T-= 42);
98 Func-= 42;
99 use(Func-= 42);
100 }
101 }
102
103 use(x) {
104 if (x == new DateTime.now().millisecondsSinceEpoch) throw "Shouldn't happen";
105 }
106
107 main() {
108 new C().test();
109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698