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

Side by Side Diff: test/codegen/closure.dart

Issue 1676463002: Type annotations instead of closure comments. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged master Created 4 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
« no previous file with comments | « test/closure/closure_annotation_test.dart ('k') | test/codegen/expect/closure.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library test; 1 library test;
2 import 'dart:js'; 2 import 'dart:js';
3 3
4 List/*<T>*/ generic_function/*<T>*/(List/*<T>*/ items, dynamic/*=T*/ seed) {
5 var strings = items.map((i) => "$i").toList();
6 return items;
7 }
4 8
5 typedef void Callback({int i}); 9 typedef void Callback({int i});
6 10
7 class Foo<T> { 11 class Foo<T> {
8 final int i; 12 final int i;
9 bool b; 13 bool b;
10 String s; 14 String s;
11 T v; 15 T v;
12 16
13 Foo(this.i, this.v); 17 Foo(this.i, this.v);
14 18
15 factory Foo.build() => new Foo(1, null); 19 factory Foo.build() => new Foo(1, null);
16 20
17 untyped_method(a, b) {} 21 untyped_method(a, b) {}
18 22
19 T pass(T t) => t; 23 T pass(T t) => t;
20 24
21 String typed_method( 25 String typed_method(
22 Foo foo, List list, 26 Foo foo, List list,
23 int i, num n, double d, bool b, String s, 27 int i, num n, double d, bool b, String s,
24 JsArray a, JsObject o, JsFunction f) { 28 JsArray a, JsObject o, JsFunction f) {
25 return ''; 29 return '';
26 } 30 }
27 31
28 optional_params(a, [b, c]) {} 32 optional_params(a, [b, int c]) {}
29 33
30 static named_params(a, {b, c}) {} 34 static named_params(a, {b, int c}) {}
31 35
32 nullary_method() {} 36 nullary_method() {}
33 37
34 function_params(int f(x, [y]), g(x, {String y, z}), Callback cb) { 38 function_params(int f(x, [y]), g(x, {String y, z}), Callback cb) {
35 cb(i: i); 39 cb(i: i);
36 } 40 }
37 41
42 run(List a, String b, List c(String d), List<int> e(f(g)), {Map<Map, Map> h}) {}
43
38 String get prop => null; 44 String get prop => null;
39 set prop(String value) {} 45 set prop(String value) {}
40 46
41 static String get staticProp => null; 47 static String get staticProp => null;
42 static set staticProp(String value) {} 48 static set staticProp(String value) {}
43 49
44 static const String some_static_constant = "abc"; 50 static const String some_static_constant = "abc";
45 static final String some_static_final = "abc"; 51 static final String some_static_final = "abc";
46 static String some_static_var = "abc"; 52 static String some_static_var = "abc";
47 } 53 }
48 54
49 class Bar {} 55 class Bar {}
50 56
51 class Baz extends Foo<int> with Bar { 57 class Baz extends Foo<int> with Bar {
52 Baz(int i) : super(i, 123); 58 Baz(int i) : super(i, 123);
53 } 59 }
54 60
55 void main(args) {} 61 void main(args) {}
56 62
57 const String some_top_level_constant = "abc"; 63 const String some_top_level_constant = "abc";
58 final String some_top_level_final = "abc"; 64 final String some_top_level_final = "abc";
59 String some_top_level_var = "abc"; 65 String some_top_level_var = "abc";
OLDNEW
« no previous file with comments | « test/closure/closure_annotation_test.dart ('k') | test/codegen/expect/closure.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698