1bad9304a0
Also remove some duplicated code so libraries are mostly only printed in one place. Change-Id: I7cb86bff1938f05631d7eb3432deda2c9939f402 Reviewed-on: https://dart-review.googlesource.com/c/90226 Reviewed-by: Peter von der Ahé <ahe@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
import "dart:async" as asy;
|
|
|
|
import "dart:async";
|
|
|
|
class X extends core::Object {
|
|
final field dynamic x;
|
|
final field dynamic y;
|
|
constructor •(dynamic x, dynamic y) → self::X
|
|
: self::X::x = x, self::X::y = y, super core::Object::•()
|
|
;
|
|
method toString() → core::String
|
|
return "X(${this.{self::X::x}}, ${this.{self::X::y}})";
|
|
}
|
|
class Y extends core::Object {
|
|
synthetic constructor •() → self::Y
|
|
: super core::Object::•()
|
|
;
|
|
method f(dynamic _) → dynamic {}
|
|
}
|
|
static method f1() → asy::Future<core::List<core::Object>> async {
|
|
return <core::Object>[1];
|
|
}
|
|
static method f2() → core::List<core::Object>
|
|
return <core::Object>[2];
|
|
static method f3() → asy::Future<core::Object> async {
|
|
return 3;
|
|
}
|
|
static method foo() → asy::Future<self::X> async {
|
|
return new self::X::•(let final self::Y #t1 = new self::Y::•() in let final dynamic #t2 = #t1.{self::Y::f}(await self::f1()) in let final dynamic #t3 = #t1.{self::Y::f}(self::f2()) in #t1, await self::f3());
|
|
}
|
|
static method main() → asy::Future<void> async {
|
|
core::print(await self::foo());
|
|
}
|