library test;
import self as self;
import "dart:async" as asy;
import "dart:math" as math;
import "dart:core" as core;

import "dart:async";
import "dart:math";

static method test() → dynamic {
  dynamic f = () → asy::Future<dynamic>* async {
    if(math::Random::•().nextBool()) {
      return asy::Future::value<core::int*>(1);
    }
    else {
      return 2.0;
    }
  };
  asy::Future<core::num*>* g = f.call();
  asy::Future<core::int*>* h = f.call();
}
static method main() → dynamic {}
