blob: 4637a4f076d77c9148869a535ab5e7448071fc60 [file] [log] [blame]
library test;
import self as self;
import "dart:async" as asy;
import "dart:core" as core;
import "dart:math" as math;
import "dart:async";
import "dart:math" show Random;
static method test() dynamic {
() →* asy::Future<core::num*>* f = () asy::Future<core::num*>* async {
if(math::Random::•().{math::Random::nextBool}()) {
return asy::Future::value<core::int*>(1);
}
else {
return asy::Future::value<core::double*>(2.0);
}
};
asy::Future<core::num*>* g = f.call();
asy::Future<core::int*>* h = f.call() as{TypeError} asy::Future<core::int*>*;
}
static method main() dynamic {}