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

Side by Side Diff: test/dart_codegen/expect/async/timer.dart

Issue 1038213003: Downward inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Implement named arguments, some fixes Created 5 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
1 part of dart.async; 1 part of dart.async;
2 abstract class Timer {factory Timer(Duration duration, void callback()) { 2 abstract class Timer {factory Timer(Duration duration, void callback()) {
3 if (Zone.current == Zone.ROOT) { 3 if (Zone.current == Zone.ROOT) {
4 return Zone.current.createTimer(duration, callback); 4 return Zone.current.createTimer(duration, callback);
5 } 5 }
6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback, runGuarded: true)); 6 return Zone.current.createTimer(duration, Zone.current.bindCallback(callback, runGuarded: true));
7 } 7 }
8 factory Timer.periodic(Duration duration, void callback(Timer timer)) { 8 factory Timer.periodic(Duration duration, void callback(Timer timer)) {
9 if (Zone.current == Zone.ROOT) { 9 if (Zone.current == Zone.ROOT) {
10 return Zone.current.createPeriodicTimer(duration, callback); 10 return Zone.current.createPeriodicTimer(duration, callback);
11 } 11 }
12 return Zone.current.createPeriodicTimer(duration, ((__x142) => DEVC$RT.wrap(( dynamic f(dynamic __u137)) { 12 return Zone.current.createPeriodicTimer(duration, ((__x133) => DEVC$RT.wrap(( dynamic f(dynamic __u128)) {
13 dynamic c(dynamic x0) => f(x0); 13 dynamic c(dynamic x0) => f(x0);
14 return f == null ? null : c; 14 return f == null ? null : c;
15 } 15 }
16 , __x142, __t140, __t138, "Wrap", """line 80, column 19 of dart:async/timer.da rt: """, __x142 is __t138))(Zone.current.bindUnaryCallback(callback, runGuarded: true))); 16 , __x133, __t131, __t129, "Wrap", """line 80, column 19 of dart:async/timer.da rt: """, __x133 is __t129))(Zone.current.bindUnaryCallback(callback, runGuarded: true)));
17 } 17 }
18 static void run(void callback()) { 18 static void run(void callback()) {
19 new Timer(Duration.ZERO, callback); 19 new Timer(Duration.ZERO, callback);
20 } 20 }
21 void cancel(); 21 void cancel();
22 bool get isActive; 22 bool get isActive;
23 external static Timer _createTimer(Duration duration, void callback()); 23 external static Timer _createTimer(Duration duration, void callback());
24 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim er timer)); 24 external static Timer _createPeriodicTimer(Duration duration, void callback(Tim er timer));
25 } 25 }
26 typedef void __t138(Timer __u139); 26 typedef void __t129(Timer __u130);
27 typedef dynamic __t140(dynamic __u141); 27 typedef dynamic __t131(dynamic __u132);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/async/stream_transformers.dart ('k') | test/dart_codegen/expect/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698