mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:29:47 +00:00
[cfe] Add AwaitExpression.runtimeTypeCheck
Add AwaitExpression.runtimeTypeCheck to support easy backend implementation of runtime type check. In response to https://github.com/dart-lang/sdk/issues/49396 TEST=pkg/front_end/testcases/general/issue49396.dart Change-Id: I13b9b14566ebc34cdb0811c16a262421417b68e7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270723 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
parent
414f318a05
commit
6f54f6236e
|
@ -722,10 +722,16 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
|||
ExpressionInferenceResult operandResult = inferExpression(
|
||||
node.operand, typeContext,
|
||||
isVoidAllowed: !isNonNullableByDefault);
|
||||
DartType inferredType =
|
||||
typeSchemaEnvironment.flatten(operandResult.inferredType);
|
||||
DartType operandType = operandResult.inferredType;
|
||||
DartType flattenType = typeSchemaEnvironment.flatten(operandType);
|
||||
node.operand = operandResult.expression..parent = node;
|
||||
return new ExpressionInferenceResult(inferredType, node);
|
||||
DartType runtimeCheckType = new InterfaceType(
|
||||
coreTypes.futureClass, libraryBuilder.nonNullable, [flattenType]);
|
||||
if (!typeSchemaEnvironment.isSubtypeOf(
|
||||
operandType, runtimeCheckType, SubtypeCheckMode.withNullabilities)) {
|
||||
node.runtimeCheckType = runtimeCheckType;
|
||||
}
|
||||
return new ExpressionInferenceResult(flattenType, node);
|
||||
}
|
||||
|
||||
List<Statement>? _visitStatements<T extends Statement>(List<T> statements) {
|
||||
|
|
|
@ -4,10 +4,10 @@ import "dart:async" as asy;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method foo1() → asy::Future<void> async /* futureValueType= void */ {
|
||||
await 6;
|
||||
await 6 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
static method foo2() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return (await 6).{core::num::+}(3){(core::num) → core::int};
|
||||
return (await 6 /* runtimeCheckType= asy::Future<core::int> */ ).{core::num::+}(3){(core::num) → core::int};
|
||||
}
|
||||
static method foo3() → asy::Future<void> async /* futureValueType= void */ {
|
||||
#L1:
|
||||
|
|
|
@ -4,10 +4,10 @@ import "dart:async" as asy;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method foo1() → asy::Future<void> async /* futureValueType= void */ {
|
||||
await 6;
|
||||
await 6 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
static method foo2() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return (await 6).{core::num::+}(3){(core::num) → core::int};
|
||||
return (await 6 /* runtimeCheckType= asy::Future<core::int> */ ).{core::num::+}(3){(core::num) → core::int};
|
||||
}
|
||||
static method foo3() → asy::Future<void> async /* futureValueType= void */ {
|
||||
#L1:
|
||||
|
|
|
@ -4,10 +4,10 @@ import "dart:async" as asy;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method foo1() → asy::Future<void> async /* futureValueType= void */ {
|
||||
await 6;
|
||||
await 6 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
static method foo2() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return (await 6).{core::num::+}(3){(core::num) → core::int};
|
||||
return (await 6 /* runtimeCheckType= asy::Future<core::int> */ ).{core::num::+}(3){(core::num) → core::int};
|
||||
}
|
||||
static method foo3() → asy::Future<void> async /* futureValueType= void */ {
|
||||
#L1:
|
||||
|
|
|
@ -4,10 +4,10 @@ import "dart:async" as asy;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method foo1() → asy::Future<void> async /* futureValueType= void */ {
|
||||
await 6;
|
||||
await 6 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
static method foo2() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return (await 6).{core::num::+}(3){(core::num) → core::int};
|
||||
return (await 6 /* runtimeCheckType= asy::Future<core::int> */ ).{core::num::+}(3){(core::num) → core::int};
|
||||
}
|
||||
static method foo3() → asy::Future<void> async /* futureValueType= void */ {
|
||||
#L1:
|
||||
|
|
|
@ -4,10 +4,10 @@ import "dart:async" as asy;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method foo1() → asy::Future<void> async /* futureValueType= void */ {
|
||||
await 6;
|
||||
await 6 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
static method foo2() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return (await 6).{core::num::+}(3){(core::num) → core::int};
|
||||
return (await 6 /* runtimeCheckType= asy::Future<core::int> */ ).{core::num::+}(3){(core::num) → core::int};
|
||||
}
|
||||
static method foo3() → asy::Future<void> async /* futureValueType= void */ {
|
||||
#L1:
|
||||
|
|
|
@ -10,19 +10,19 @@ static method main() → dynamic async /* futureValueType= dynamic */ {
|
|||
await self::returnsFutureOrString();
|
||||
await self::returnsAwaitFutureOrString();
|
||||
await self::returnsFutureString();
|
||||
await self::returnsAwaitFutureString();
|
||||
await self::returnsAwaitFutureString() /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
await self::returnsObject();
|
||||
await self::returnsFutureOrObject();
|
||||
await self::returnsAwaitFutureOrObject();
|
||||
await self::returnsFutureObject();
|
||||
await self::returnsAwaitFutureObject();
|
||||
await self::returnsAwaitFutureObject() /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
}
|
||||
static method returnsString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return "a";
|
||||
static method returnsFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFutureOr<core::String>("a");
|
||||
static method returnsAwaitFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return await self::getFutureOr<core::String>("a");
|
||||
return await self::getFutureOr<core::String>("a") /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
static method returnsFutureString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFuture<core::String>("a");
|
||||
static method returnsAwaitFutureString() → FutureOr<core::String> async /* futureValueType= core::String */
|
||||
|
@ -32,7 +32,7 @@ static method returnsObject() → asy::Future<core::Object> async /* futureValue
|
|||
static method returnsFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFutureOr<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•());
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•()) /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
static method returnsFutureObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFuture<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureObject() → FutureOr<core::Object> async /* futureValueType= core::Object */
|
||||
|
|
|
@ -10,19 +10,19 @@ static method main() → dynamic async /* futureValueType= dynamic */ {
|
|||
await self::returnsFutureOrString();
|
||||
await self::returnsAwaitFutureOrString();
|
||||
await self::returnsFutureString();
|
||||
await self::returnsAwaitFutureString();
|
||||
await self::returnsAwaitFutureString() /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
await self::returnsObject();
|
||||
await self::returnsFutureOrObject();
|
||||
await self::returnsAwaitFutureOrObject();
|
||||
await self::returnsFutureObject();
|
||||
await self::returnsAwaitFutureObject();
|
||||
await self::returnsAwaitFutureObject() /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
}
|
||||
static method returnsString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return "a";
|
||||
static method returnsFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFutureOr<core::String>("a");
|
||||
static method returnsAwaitFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return await self::getFutureOr<core::String>("a");
|
||||
return await self::getFutureOr<core::String>("a") /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
static method returnsFutureString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFuture<core::String>("a");
|
||||
static method returnsAwaitFutureString() → FutureOr<core::String> async /* futureValueType= core::String */
|
||||
|
@ -32,7 +32,7 @@ static method returnsObject() → asy::Future<core::Object> async /* futureValue
|
|||
static method returnsFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFutureOr<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•());
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•()) /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
static method returnsFutureObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFuture<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureObject() → FutureOr<core::Object> async /* futureValueType= core::Object */
|
||||
|
|
|
@ -10,19 +10,19 @@ static method main() → dynamic async /* futureValueType= dynamic */ {
|
|||
await self::returnsFutureOrString();
|
||||
await self::returnsAwaitFutureOrString();
|
||||
await self::returnsFutureString();
|
||||
await self::returnsAwaitFutureString();
|
||||
await self::returnsAwaitFutureString() /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
await self::returnsObject();
|
||||
await self::returnsFutureOrObject();
|
||||
await self::returnsAwaitFutureOrObject();
|
||||
await self::returnsFutureObject();
|
||||
await self::returnsAwaitFutureObject();
|
||||
await self::returnsAwaitFutureObject() /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
}
|
||||
static method returnsString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return "a";
|
||||
static method returnsFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFutureOr<core::String>("a");
|
||||
static method returnsAwaitFutureOrString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return await self::getFutureOr<core::String>("a");
|
||||
return await self::getFutureOr<core::String>("a") /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
static method returnsFutureString() → asy::Future<core::String> async /* futureValueType= core::String */
|
||||
return self::getFuture<core::String>("a");
|
||||
static method returnsAwaitFutureString() → FutureOr<core::String> async /* futureValueType= core::String */
|
||||
|
@ -32,7 +32,7 @@ static method returnsObject() → asy::Future<core::Object> async /* futureValue
|
|||
static method returnsFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFutureOr<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureOrObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•());
|
||||
return await self::getFutureOr<core::Object>(new core::Object::•()) /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
static method returnsFutureObject() → asy::Future<core::Object> async /* futureValueType= core::Object */
|
||||
return self::getFuture<core::Object>(new core::Object::•());
|
||||
static method returnsAwaitFutureObject() → FutureOr<core::Object> async /* futureValueType= core::Object */
|
||||
|
|
|
@ -3,5 +3,5 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::print(await "Hello, World!");
|
||||
core::print(await "Hello, World!" /* runtimeCheckType= dart.async::Future<core::String> */ );
|
||||
}
|
||||
|
|
|
@ -3,5 +3,5 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::print(await "Hello, World!");
|
||||
core::print(await "Hello, World!" /* runtimeCheckType= dart.async::Future<core::String> */ );
|
||||
}
|
||||
|
|
|
@ -3,5 +3,5 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::print(await "Hello, World!");
|
||||
core::print(await "Hello, World!" /* runtimeCheckType= dart.async::Future<core::String> */ );
|
||||
}
|
||||
|
|
|
@ -54,80 +54,80 @@ static set topLevelSetter(dynamic val) → void {
|
|||
static method dummy() → dynamic
|
||||
return 1;
|
||||
static method staticMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, f);
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(3, d);
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method topLevelMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method instanceMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
self::C inst = new self::C::•();
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method others() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String a = "${self::globalVariable} ${await self::dummy()} ".{core::String::+}(await "someString"){(core::String) → core::String};
|
||||
core::String a = "${self::globalVariable} ${await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ } ".{core::String::+}(await "someString" /* runtimeCheckType= asy::Future<core::String> */ ){(core::String) → core::String};
|
||||
self::expect("1 1 someString", a);
|
||||
self::C c = new self::C::•();
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::int cnt = 2;
|
||||
core::List<core::int> b = <core::int>[1, 2, 3];
|
||||
b.{core::List::[]=}(cnt, await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
b.{core::List::[]=}(cnt, await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
self::expect(1, b.{core::List::[]}(cnt){(core::int) → core::int});
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, e);
|
||||
}
|
||||
static method conditionals() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::bool a = false;
|
||||
core::bool b = true;
|
||||
core::bool c = a || b || await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
core::bool c = a || b || await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
self::expect(true, c);
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy();
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
self::expect(false, d);
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
self::expect(2, e);
|
||||
try {
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
}
|
||||
}
|
||||
static method asserts() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func in <<T extends core::Object? = dynamic>(T%) → FutureOr<T%>>[#C1, #C2]) {
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ );
|
||||
assert(invalid-expression "pkg/front_end/testcases/general/await_complex.dart:120:12: Error: A value of type 'FutureOr<bool>' can't be assigned to a variable of type 'bool'.
|
||||
assert(id(true), await func(\"message\"));
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
try {
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
if(self::assertStatementsEnabled)
|
||||
throw "Didn't throw";
|
||||
}
|
||||
|
@ -139,28 +139,28 @@ static method asserts() → dynamic async /* futureValueType= dynamic */ {
|
|||
static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func in <<T extends core::Object? = dynamic>(T%) → FutureOr<T%>>[#C1, #C2]) {
|
||||
core::int c = 0;
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>}; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>}; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>}) {
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
do {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
self::expect(5, c);
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>}) {
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ) {
|
||||
self::expect(5, c);
|
||||
}
|
||||
else {
|
||||
throw "unreachable";
|
||||
}
|
||||
try {
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>};
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
on core::String catch(no-exception-var) {
|
||||
}
|
||||
|
@ -177,22 +177,22 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect("string", e);
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
rethrow;
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
self::expect("string", e);
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
#L1:
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>}) {
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
#L2:
|
||||
case #C3:
|
||||
{
|
||||
|
@ -205,17 +205,17 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
}
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
})(){() → asy::Future<core::int>});
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
})(){() → asy::Future<core::int>});
|
||||
function testStream1() → asy::Stream<core::int> async* {
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
self::expectList(<dynamic>[42], await testStream1(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
function testStream2() → asy::Stream<core::int> async* {
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>};
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>} /* runtimeCheckType= asy::Future<asy::Stream<core::int>> */ ;
|
||||
}
|
||||
self::expectList(<dynamic>[42], await testStream2(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
}
|
||||
|
@ -229,13 +229,13 @@ static method intStream() → asy::Stream<core::int> async* {
|
|||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (core::int i = 0; i.{core::num::<}(11){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
await self::staticMembers();
|
||||
await self::topLevelMembers();
|
||||
await self::instanceMembers();
|
||||
await self::conditionals();
|
||||
await self::others();
|
||||
await self::asserts();
|
||||
await self::controlFlow();
|
||||
await self::staticMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::topLevelMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::instanceMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::conditionals() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::others() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::asserts() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::controlFlow() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
}
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
|
|
|
@ -54,80 +54,80 @@ static set topLevelSetter(dynamic val) → void {
|
|||
static method dummy() → dynamic
|
||||
return 1;
|
||||
static method staticMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, f);
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(3, d);
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method topLevelMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method instanceMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
self::C inst = new self::C::•();
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method others() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String a = "${self::globalVariable} ${await self::dummy()} ".{core::String::+}(await "someString"){(core::String) → core::String};
|
||||
core::String a = "${self::globalVariable} ${await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ } ".{core::String::+}(await "someString" /* runtimeCheckType= asy::Future<core::String> */ ){(core::String) → core::String};
|
||||
self::expect("1 1 someString", a);
|
||||
self::C c = new self::C::•();
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::int cnt = 2;
|
||||
core::List<core::int> b = <core::int>[1, 2, 3];
|
||||
b.{core::List::[]=}(cnt, await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
b.{core::List::[]=}(cnt, await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
self::expect(1, b.{core::List::[]}(cnt){(core::int) → core::int});
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, e);
|
||||
}
|
||||
static method conditionals() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::bool a = false;
|
||||
core::bool b = true;
|
||||
core::bool c = a || b || await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
core::bool c = a || b || await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
self::expect(true, c);
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy();
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
self::expect(false, d);
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
self::expect(2, e);
|
||||
try {
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
}
|
||||
}
|
||||
static method asserts() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func in <<T extends core::Object? = dynamic>(T%) → FutureOr<T%>>[#C1, #C2]) {
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ );
|
||||
assert(invalid-expression "pkg/front_end/testcases/general/await_complex.dart:120:12: Error: A value of type 'FutureOr<bool>' can't be assigned to a variable of type 'bool'.
|
||||
assert(id(true), await func(\"message\"));
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
try {
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
if(self::assertStatementsEnabled)
|
||||
throw "Didn't throw";
|
||||
}
|
||||
|
@ -139,28 +139,28 @@ static method asserts() → dynamic async /* futureValueType= dynamic */ {
|
|||
static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func in <<T extends core::Object? = dynamic>(T%) → FutureOr<T%>>[#C1, #C2]) {
|
||||
core::int c = 0;
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>}; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>}; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>}) {
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
do {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
self::expect(5, c);
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>}) {
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ) {
|
||||
self::expect(5, c);
|
||||
}
|
||||
else {
|
||||
throw "unreachable";
|
||||
}
|
||||
try {
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>};
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
on core::String catch(no-exception-var) {
|
||||
}
|
||||
|
@ -177,22 +177,22 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect("string", e);
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
rethrow;
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
self::expect("string", e);
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
#L1:
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>}) {
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
#L2:
|
||||
case #C3:
|
||||
{
|
||||
|
@ -205,17 +205,17 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
}
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
})(){() → asy::Future<core::int>});
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
})(){() → asy::Future<core::int>});
|
||||
function testStream1() → asy::Stream<core::int> async* {
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
self::expectList(<dynamic>[42], await testStream1(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
function testStream2() → asy::Stream<core::int> async* {
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>};
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>} /* runtimeCheckType= asy::Future<asy::Stream<core::int>> */ ;
|
||||
}
|
||||
self::expectList(<dynamic>[42], await testStream2(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
}
|
||||
|
@ -229,13 +229,13 @@ static method intStream() → asy::Stream<core::int> async* {
|
|||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (core::int i = 0; i.{core::num::<}(11){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
await self::staticMembers();
|
||||
await self::topLevelMembers();
|
||||
await self::instanceMembers();
|
||||
await self::conditionals();
|
||||
await self::others();
|
||||
await self::asserts();
|
||||
await self::controlFlow();
|
||||
await self::staticMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::topLevelMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::instanceMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::conditionals() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::others() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::asserts() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::controlFlow() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
}
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
|
|
|
@ -54,67 +54,67 @@ static set topLevelSetter(dynamic val) → void {
|
|||
static method dummy() → dynamic
|
||||
return 1;
|
||||
static method staticMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::C::staticField.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num f = (self::C::staticField = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, f);
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::C::staticGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::C::staticSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::C::staticFoo(2).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(3, d);
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::C::staticField.{core::num::+}(self::C::staticGetter){(core::num) → core::int}.{core::num::+}(self::C::staticSetter = 1){(core::num) → core::int}.{core::num::+}(self::C::staticFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method topLevelMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = self::globalVariable.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = self::topLevelGetter.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (self::topLevelSetter = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = self::topLevelFoo(1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = self::globalVariable.{core::num::+}(self::topLevelGetter){(core::num) → core::int}.{core::num::+}(self::topLevelSetter = 1){(core::num) → core::int}.{core::num::+}(self::topLevelFoo(1)){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method instanceMembers() → dynamic async /* futureValueType= dynamic */ {
|
||||
self::C inst = new self::C::•();
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num a = inst.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, a);
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num b = inst.{self::C::getter}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, b);
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num c = (inst.{self::C::setter} = 1).{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, c);
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = inst.{self::C::foo}(1){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, d);
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = inst.{self::C::field}{core::int}.{core::num::+}(inst.{self::C::getter}{core::int}){(core::num) → core::int}.{core::num::+}(inst.{self::C::setter} = 1){(core::num) → core::int}.{core::num::+}(inst.{self::C::foo}(1){(core::int) → core::int}){(core::num) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(5, e);
|
||||
}
|
||||
static method others() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String a = "${self::globalVariable} ${await self::dummy()} ".{core::String::+}(await "someString"){(core::String) → core::String};
|
||||
core::String a = "${self::globalVariable} ${await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ } ".{core::String::+}(await "someString" /* runtimeCheckType= asy::Future<core::String> */ ){(core::String) → core::String};
|
||||
self::expect("1 1 someString", a);
|
||||
self::C c = new self::C::•();
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num d = c.{self::C::field}{core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::int cnt = 2;
|
||||
core::List<core::int> b = core::_GrowableList::_literal3<core::int>(1, 2, 3);
|
||||
b.{core::List::[]=}(cnt, await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
b.{core::List::[]=}(cnt, await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int, core::int) → void};
|
||||
self::expect(1, b.{core::List::[]}(cnt){(core::int) → core::int});
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
core::num e = b.{core::List::[]}(0){(core::int) → core::int}.{core::num::+}(await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num};
|
||||
self::expect(2, e);
|
||||
}
|
||||
static method conditionals() → dynamic async /* futureValueType= dynamic */ {
|
||||
core::bool a = false;
|
||||
core::bool b = true;
|
||||
core::bool c = a || b || await self::dummy() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
core::bool c = a || b || await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
|
||||
self::expect(true, c);
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy();
|
||||
dynamic d = a || b ?{dynamic} a : await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
self::expect(false, d);
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic e = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
self::expect(2, e);
|
||||
try {
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() : 2;
|
||||
dynamic f = a is{ForNonNullableByDefault} core::int ?{dynamic} await self::dummy() /* runtimeCheckType= asy::Future<dynamic> */ : 2;
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
}
|
||||
|
@ -125,13 +125,13 @@ static method asserts() → dynamic async /* futureValueType= dynamic */ {
|
|||
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) {
|
||||
final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func = :sync-for-iterator.{core::Iterator::current}{<T extends core::Object? = dynamic>(T%) → FutureOr<T%>};
|
||||
{
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ );
|
||||
assert(invalid-expression "pkg/front_end/testcases/general/await_complex.dart:120:12: Error: A value of type 'FutureOr<bool>' can't be assigned to a variable of type 'bool'.
|
||||
assert(id(true), await func(\"message\"));
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
^" in self::id<core::bool>(true) as{TypeError,ForNonNullableByDefault} core::bool, await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
assert(await func<core::bool>(true){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
try {
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>}, await func<core::String>("message"){(core::String) → FutureOr<core::String>});
|
||||
assert(await func<core::bool>(false){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ , await func<core::String>("message"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ );
|
||||
if(self::assertStatementsEnabled)
|
||||
throw "Didn't throw";
|
||||
}
|
||||
|
@ -149,28 +149,28 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
final <T extends core::Object? = dynamic>(T%) → FutureOr<T%>func = :sync-for-iterator.{core::Iterator::current}{<T extends core::Object? = dynamic>(T%) → FutureOr<T%>};
|
||||
{
|
||||
core::int c = 0;
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>}; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>}; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>}) {
|
||||
for (core::int i = await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ; await func<core::bool>(i.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ; await func<core::int>(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1){(core::num) → core::int} in #t1){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
self::expect(5, c);
|
||||
c = 0;
|
||||
do {
|
||||
c = c.{core::num::+}(1){(core::num) → core::int};
|
||||
}
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>})
|
||||
while (await func<core::bool>(c.{core::num::<}(5){(core::num) → core::bool}){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ )
|
||||
self::expect(5, c);
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>}) {
|
||||
if(await func<core::bool>(c =={core::num::==}{(core::Object) → core::bool} 5){(core::bool) → FutureOr<core::bool>} /* runtimeCheckType= asy::Future<core::bool> */ ) {
|
||||
self::expect(5, c);
|
||||
}
|
||||
else {
|
||||
throw "unreachable";
|
||||
}
|
||||
try {
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>};
|
||||
throw await func<core::String>("string"){(core::String) → FutureOr<core::String>} /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
on core::String catch(no-exception-var) {
|
||||
}
|
||||
|
@ -187,22 +187,22 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect("string", e);
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
rethrow;
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
}
|
||||
on core::Object catch(final core::Object e) {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
self::expect("string", e);
|
||||
}
|
||||
finally {
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>});
|
||||
self::expect(0, await func<core::int>(0){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ );
|
||||
}
|
||||
#L1:
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>}) {
|
||||
switch(await func<core::int>(2){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ) {
|
||||
#L2:
|
||||
case #C3:
|
||||
{
|
||||
|
@ -215,17 +215,17 @@ static method controlFlow() → dynamic async /* futureValueType= dynamic */ {
|
|||
}
|
||||
}
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
return await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
})(){() → asy::Future<core::int>});
|
||||
self::expect(42, await(() → asy::Future<core::int> async /* futureValueType= core::int */ {
|
||||
return func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
})(){() → asy::Future<core::int>});
|
||||
function testStream1() → asy::Stream<core::int> async* {
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>};
|
||||
yield await func<core::int>(42){(core::int) → FutureOr<core::int>} /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
}
|
||||
self::expectList(core::_GrowableList::_literal1<dynamic>(42), await testStream1(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
function testStream2() → asy::Stream<core::int> async* {
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>};
|
||||
yield* await func<asy::Stream<core::int>>(self::intStream()){(asy::Stream<core::int>) → FutureOr<asy::Stream<core::int>>} /* runtimeCheckType= asy::Future<asy::Stream<core::int>> */ ;
|
||||
}
|
||||
self::expectList(core::_GrowableList::_literal1<dynamic>(42), await testStream2(){() → asy::Stream<core::int>}.{asy::Stream::toList}(){() → asy::Future<core::List<core::int>>});
|
||||
}
|
||||
|
@ -241,13 +241,13 @@ static method intStream() → asy::Stream<core::int> async* {
|
|||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
for (core::int i = 0; i.{core::num::<}(11){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
await self::staticMembers();
|
||||
await self::topLevelMembers();
|
||||
await self::instanceMembers();
|
||||
await self::conditionals();
|
||||
await self::others();
|
||||
await self::asserts();
|
||||
await self::controlFlow();
|
||||
await self::staticMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::topLevelMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::instanceMembers() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::conditionals() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::others() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::asserts() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
await self::controlFlow() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
}
|
||||
}
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
|
|
|
@ -56,16 +56,16 @@ static method returnFutureClassFromFutureOrClass() → asy::Future<self::Class>
|
|||
static method returnFutureOrClassFromFutureOrClass() → FutureOr<self::Class> async /* futureValueType= self::Class */
|
||||
return self::returnFutureOrClass();
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await self::returnClass();
|
||||
await self::returnClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClass();
|
||||
await self::returnFutureOrClass();
|
||||
await self::returnClassFromDynamic();
|
||||
await self::returnFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassDynamic();
|
||||
await self::returnFutureOrClassDynamic();
|
||||
await self::returnClassFromFutureClass();
|
||||
await self::returnFutureOrClassDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureClass();
|
||||
await self::returnFutureOrClassFromFutureClass();
|
||||
await self::returnClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
}
|
||||
|
|
|
@ -56,16 +56,16 @@ static method returnFutureClassFromFutureOrClass() → asy::Future<self::Class>
|
|||
static method returnFutureOrClassFromFutureOrClass() → FutureOr<self::Class> async /* futureValueType= self::Class */
|
||||
return self::returnFutureOrClass();
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await self::returnClass();
|
||||
await self::returnClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClass();
|
||||
await self::returnFutureOrClass();
|
||||
await self::returnClassFromDynamic();
|
||||
await self::returnFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassDynamic();
|
||||
await self::returnFutureOrClassDynamic();
|
||||
await self::returnClassFromFutureClass();
|
||||
await self::returnFutureOrClassDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureClass();
|
||||
await self::returnFutureOrClassFromFutureClass();
|
||||
await self::returnClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
}
|
||||
|
|
|
@ -56,16 +56,16 @@ static method returnFutureClassFromFutureOrClass() → asy::Future<self::Class>
|
|||
static method returnFutureOrClassFromFutureOrClass() → FutureOr<self::Class> async /* futureValueType= self::Class */
|
||||
return self::returnFutureOrClass();
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await self::returnClass();
|
||||
await self::returnClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClass();
|
||||
await self::returnFutureOrClass();
|
||||
await self::returnClassFromDynamic();
|
||||
await self::returnFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassDynamic();
|
||||
await self::returnFutureOrClassDynamic();
|
||||
await self::returnClassFromFutureClass();
|
||||
await self::returnFutureOrClassDynamic() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureClass();
|
||||
await self::returnFutureOrClassFromFutureClass();
|
||||
await self::returnClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
await self::returnFutureClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass();
|
||||
await self::returnFutureOrClassFromFutureOrClass() /* runtimeCheckType= asy::Future<self::Class> */ ;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ static field () → Null a = () → Null {
|
|||
^" in null;
|
||||
}
|
||||
};
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f;
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
static field (dynamic) → dynamic c = (dynamic f) → dynamic => f;
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -36,6 +36,6 @@ static field () → Null a = () → Null {
|
|||
^" in null;
|
||||
}
|
||||
};
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f;
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
static field (dynamic) → dynamic c = (dynamic f) → dynamic => f;
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -36,6 +36,6 @@ static field () → Null a = () → Null {
|
|||
^" in null;
|
||||
}
|
||||
};
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f;
|
||||
static field (dynamic) → asy::Future<dynamic> b = (dynamic f) → asy::Future<dynamic> async /* futureValueType= dynamic */ => await f /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
static field (dynamic) → dynamic c = (dynamic f) → dynamic => f;
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -9,7 +9,7 @@ static method bar(core::int* a, core::List<core::int*>* b) → dynamic {
|
|||
static method foo(core::int* x) → dynamic async /* futureValueType= dynamic */
|
||||
return self::bar(x.{core::num::-}(1){(core::num*) →* core::int*}, !(x == null) ?{core::List<core::int*>*} <core::int*>[x.{core::num::+}(1){(core::num*) →* core::int*}, x.{core::num::+}(2){(core::num*) →* core::int*}, await null] : null);
|
||||
static method main() → void async /* futureValueType= void */
|
||||
return await self::foo(0);
|
||||
return await self::foo(0) /* runtimeCheckType= dart.async::Future<dynamic>* */ ;
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
|
|
|
@ -9,7 +9,7 @@ static method bar(core::int* a, core::List<core::int*>* b) → dynamic {
|
|||
static method foo(core::int* x) → dynamic async /* futureValueType= dynamic */
|
||||
return self::bar(x.{core::num::-}(1){(core::num*) →* core::int*}, !(x == null) ?{core::List<core::int*>*} <core::int*>[x.{core::num::+}(1){(core::num*) →* core::int*}, x.{core::num::+}(2){(core::num*) →* core::int*}, await null] : null);
|
||||
static method main() → void async /* futureValueType= void */
|
||||
return await self::foo(0);
|
||||
return await self::foo(0) /* runtimeCheckType= dart.async::Future<dynamic>* */ ;
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
|
|
|
@ -9,7 +9,7 @@ static method bar(core::int* a, core::List<core::int*>* b) → dynamic {
|
|||
static method foo(core::int* x) → dynamic async /* futureValueType= dynamic */
|
||||
return self::bar(x.{core::num::-}(1){(core::num*) →* core::int*}, !(x == null) ?{core::List<core::int*>*} core::_GrowableList::_literal3<core::int*>(x.{core::num::+}(1){(core::num*) →* core::int*}, x.{core::num::+}(2){(core::num*) →* core::int*}, await null) : null);
|
||||
static method main() → void async /* futureValueType= void */
|
||||
return await self::foo(0);
|
||||
return await self::foo(0) /* runtimeCheckType= dart.async::Future<dynamic>* */ ;
|
||||
static method expect(dynamic expected, dynamic actual) → dynamic {
|
||||
if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
|
||||
throw "Expected ${expected}, actual ${actual}";
|
||||
|
|
16
pkg/front_end/testcases/general/issue49396.dart
Normal file
16
pkg/front_end/testcases/general/issue49396.dart
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
main() async {
|
||||
FutureOr<Object> future1 = Future<Object?>.value();
|
||||
var x = await future1; // Check against `Future<Object>`.
|
||||
|
||||
Object o = Future<Object?>.value();
|
||||
var y = await o; // Check against `Future<Object>`.
|
||||
|
||||
Future<Object?> future2 = Future<Object?>.value();
|
||||
var z = await future2; // No check.
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import 'dart:async';
|
||||
|
||||
main() async {}
|
|
@ -0,0 +1,3 @@
|
|||
import 'dart:async';
|
||||
|
||||
main() async {}
|
15
pkg/front_end/testcases/general/issue49396.dart.weak.expect
Normal file
15
pkg/front_end/testcases/general/issue49396.dart.weak.expect
Normal file
|
@ -0,0 +1,15 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:async" as asy;
|
||||
|
||||
import "dart:async";
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
FutureOr<core::Object>future1 = asy::Future::value<core::Object?>();
|
||||
core::Object x = await future1 /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
core::Object o = asy::Future::value<core::Object?>();
|
||||
core::Object y = await o /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
asy::Future<core::Object?> future2 = asy::Future::value<core::Object?>();
|
||||
core::Object? z = await future2;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:async" as asy;
|
||||
|
||||
import "dart:async";
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
FutureOr<core::Object>future1 = asy::Future::value<core::Object?>();
|
||||
core::Object x = await future1 /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
core::Object o = asy::Future::value<core::Object?>();
|
||||
core::Object y = await o /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
asy::Future<core::Object?> future2 = asy::Future::value<core::Object?>();
|
||||
core::Object? z = await future2;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
|
||||
import "dart:async";
|
||||
|
||||
static method main() → dynamic async
|
||||
;
|
|
@ -0,0 +1,15 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:async" as asy;
|
||||
|
||||
import "dart:async";
|
||||
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
FutureOr<core::Object>future1 = asy::Future::value<core::Object?>();
|
||||
core::Object x = await future1 /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
core::Object o = asy::Future::value<core::Object?>();
|
||||
core::Object y = await o /* runtimeCheckType= asy::Future<core::Object> */ ;
|
||||
asy::Future<core::Object?> future2 = asy::Future::value<core::Object?>();
|
||||
core::Object? z = await future2;
|
||||
}
|
|
@ -7,7 +7,7 @@ class X extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
method _foo() → void async /* futureValueType= void */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
core::print("hello");
|
||||
}
|
||||
method foo() → void
|
||||
|
|
|
@ -7,7 +7,7 @@ class X extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
method _foo() → void async /* futureValueType= void */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
core::print("hello");
|
||||
}
|
||||
method foo() → void
|
||||
|
|
|
@ -7,7 +7,7 @@ class X extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
method _foo() → void async /* futureValueType= void */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
core::print("hello");
|
||||
}
|
||||
method foo() → void
|
||||
|
|
|
@ -16,4 +16,4 @@ class B extends core::Object {
|
|||
method bar(dynamic x) → asy::Future<void> async /* futureValueType= void */ {}
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */
|
||||
return <asy::Future<void>>[new self::A::•().{self::A::foo}(await null){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null){(dynamic) → asy::Future<void>}];
|
||||
return <asy::Future<void>>[new self::A::•().{self::A::foo}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>}];
|
||||
|
|
|
@ -16,4 +16,4 @@ class B extends core::Object {
|
|||
method bar(dynamic x) → asy::Future<void> async /* futureValueType= void */ {}
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */
|
||||
return <asy::Future<void>>[new self::A::•().{self::A::foo}(await null){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null){(dynamic) → asy::Future<void>}];
|
||||
return <asy::Future<void>>[new self::A::•().{self::A::foo}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>}];
|
||||
|
|
|
@ -16,4 +16,4 @@ class B extends core::Object {
|
|||
method bar(dynamic x) → asy::Future<void> async /* futureValueType= void */ {}
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */
|
||||
return core::_GrowableList::_literal2<asy::Future<void>>(new self::A::•().{self::A::foo}(await null){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null){(dynamic) → asy::Future<void>});
|
||||
return core::_GrowableList::_literal2<asy::Future<void>>(new self::A::•().{self::A::foo}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>}, new self::B::•().{self::B::bar}(await null /* runtimeCheckType= asy::Future<Null> */ ){(dynamic) → asy::Future<void>});
|
||||
|
|
|
@ -2,7 +2,7 @@ main = main::main;
|
|||
library from "org-dartlang-test:///libA.dart" as libA {
|
||||
|
||||
static method whatever() → dynamic async /* futureValueType= dynamic */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
return "hello";
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
return "Foo!";
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await libA::whatever();
|
||||
await libA::whatever() /* runtimeCheckType= dart.async::Future<dynamic> */ ;
|
||||
dart.core::print(#C2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ main = main::main;
|
|||
library from "org-dartlang-test:///libA.dart" as libA {
|
||||
|
||||
static method whatever() → dynamic async /* futureValueType= dynamic */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
return "hello";
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
return "Foo!";
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await libA::whatever();
|
||||
await libA::whatever() /* runtimeCheckType= dart.async::Future<dynamic> */ ;
|
||||
dart.core::print(#C2);
|
||||
dart.core::print("Done");
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
return "Foo!";
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await main::whatever();
|
||||
await main::whatever() /* runtimeCheckType= dart.async::Future<dynamic> */ ;
|
||||
dart.core::print(#C2);
|
||||
}
|
||||
static method /* from org-dartlang-test:///myPart.dart */ whatever() → dynamic async /* futureValueType= dynamic */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
return "hello";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
return "Foo!";
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await main::whatever();
|
||||
await main::whatever() /* runtimeCheckType= dart.async::Future<dynamic> */ ;
|
||||
dart.core::print(#C2);
|
||||
}
|
||||
static method /* from org-dartlang-test:///myPart.dart */ whatever() → dynamic async /* futureValueType= dynamic */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
return "hello!!!";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
return "Foo!";
|
||||
}
|
||||
static method main() → dynamic async /* futureValueType= dynamic */ {
|
||||
await main::whatever();
|
||||
await main::whatever() /* runtimeCheckType= dart.async::Future<dynamic> */ ;
|
||||
dart.core::print(#C2);
|
||||
dart.core::print("Done!");
|
||||
}
|
||||
static method /* from org-dartlang-test:///myPart.dart */ whatever() → dynamic async /* futureValueType= dynamic */ {
|
||||
await null;
|
||||
await null /* runtimeCheckType= dart.async::Future<Null> */ ;
|
||||
return "hello!!!";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,15 +56,15 @@ static method test() → void async /* futureValueType= void */ {
|
|||
return x8;
|
||||
function test9() → asy::Future<core::int*>* async /* futureValueType= core::int* */
|
||||
return x9;
|
||||
core::int* y0 = await x0;
|
||||
core::int* y0 = await x0 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
core::int* y1 = await x1;
|
||||
asy::Future<core::int*>* y2 = await x2;
|
||||
FutureOr<core::int*>* y3 = await x3;
|
||||
self::MyFuture* y4 = await x4;
|
||||
core::int* y5 = await x5;
|
||||
asy::Future<core::int*>* y6 = await x6;
|
||||
FutureOr<core::int*>* y7 = await x7;
|
||||
self::MyFuture* y8 = await x8;
|
||||
core::int* y5 = await x5 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
asy::Future<core::int*>* y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int*>*>* */ ;
|
||||
FutureOr<core::int*>* y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int*>*>* */ ;
|
||||
self::MyFuture* y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture*>* */ ;
|
||||
core::int* y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -56,15 +56,15 @@ static method test() → void async /* futureValueType= void */ {
|
|||
return x8;
|
||||
function test9() → asy::Future<core::int*>* async /* futureValueType= core::int* */
|
||||
return x9;
|
||||
core::int* y0 = await x0;
|
||||
core::int* y0 = await x0 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
core::int* y1 = await x1;
|
||||
asy::Future<core::int*>* y2 = await x2;
|
||||
FutureOr<core::int*>* y3 = await x3;
|
||||
self::MyFuture* y4 = await x4;
|
||||
core::int* y5 = await x5;
|
||||
asy::Future<core::int*>* y6 = await x6;
|
||||
FutureOr<core::int*>* y7 = await x7;
|
||||
self::MyFuture* y8 = await x8;
|
||||
core::int* y5 = await x5 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
asy::Future<core::int*>* y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int*>*>* */ ;
|
||||
FutureOr<core::int*>* y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int*>*>* */ ;
|
||||
self::MyFuture* y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture*>* */ ;
|
||||
core::int* y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -56,15 +56,15 @@ static method test() → void async /* futureValueType= void */ {
|
|||
return x8;
|
||||
function test9() → asy::Future<core::int*>* async /* futureValueType= core::int* */
|
||||
return x9;
|
||||
core::int* y0 = await x0;
|
||||
core::int* y0 = await x0 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
core::int* y1 = await x1;
|
||||
asy::Future<core::int*>* y2 = await x2;
|
||||
FutureOr<core::int*>* y3 = await x3;
|
||||
self::MyFuture* y4 = await x4;
|
||||
core::int* y5 = await x5;
|
||||
asy::Future<core::int*>* y6 = await x6;
|
||||
FutureOr<core::int*>* y7 = await x7;
|
||||
self::MyFuture* y8 = await x8;
|
||||
core::int* y5 = await x5 /* runtimeCheckType= asy::Future<core::int*>* */ ;
|
||||
asy::Future<core::int*>* y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int*>*>* */ ;
|
||||
FutureOr<core::int*>* y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int*>*>* */ ;
|
||||
self::MyFuture* y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture*>* */ ;
|
||||
core::int* y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -86,15 +86,15 @@ static method test(core::int x0, asy::Future<core::int> x1, asy::Future<asy::Fut
|
|||
^" in x8 as{TypeError,ForNonNullableByDefault} core::int;
|
||||
function test9() → asy::Future<core::int> async /* futureValueType= core::int */
|
||||
return x9;
|
||||
core::int y0 = await x0;
|
||||
core::int y0 = await x0 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
core::int y1 = await x1;
|
||||
asy::Future<core::int> y2 = await x2;
|
||||
FutureOr<core::int>y3 = await x3;
|
||||
self::MyFuture y4 = await x4;
|
||||
core::int y5 = await x5;
|
||||
asy::Future<core::int> y6 = await x6;
|
||||
FutureOr<core::int>y7 = await x7;
|
||||
self::MyFuture y8 = await x8;
|
||||
core::int y5 = await x5 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
asy::Future<core::int> y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int>> */ ;
|
||||
FutureOr<core::int>y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int>> */ ;
|
||||
self::MyFuture y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture> */ ;
|
||||
core::int y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -86,15 +86,15 @@ static method test(core::int x0, asy::Future<core::int> x1, asy::Future<asy::Fut
|
|||
^" in x8 as{TypeError,ForNonNullableByDefault} core::int;
|
||||
function test9() → asy::Future<core::int> async /* futureValueType= core::int */
|
||||
return x9;
|
||||
core::int y0 = await x0;
|
||||
core::int y0 = await x0 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
core::int y1 = await x1;
|
||||
asy::Future<core::int> y2 = await x2;
|
||||
FutureOr<core::int>y3 = await x3;
|
||||
self::MyFuture y4 = await x4;
|
||||
core::int y5 = await x5;
|
||||
asy::Future<core::int> y6 = await x6;
|
||||
FutureOr<core::int>y7 = await x7;
|
||||
self::MyFuture y8 = await x8;
|
||||
core::int y5 = await x5 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
asy::Future<core::int> y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int>> */ ;
|
||||
FutureOr<core::int>y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int>> */ ;
|
||||
self::MyFuture y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture> */ ;
|
||||
core::int y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -86,15 +86,15 @@ static method test(core::int x0, asy::Future<core::int> x1, asy::Future<asy::Fut
|
|||
^" in x8 as{TypeError,ForNonNullableByDefault} core::int;
|
||||
function test9() → asy::Future<core::int> async /* futureValueType= core::int */
|
||||
return x9;
|
||||
core::int y0 = await x0;
|
||||
core::int y0 = await x0 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
core::int y1 = await x1;
|
||||
asy::Future<core::int> y2 = await x2;
|
||||
FutureOr<core::int>y3 = await x3;
|
||||
self::MyFuture y4 = await x4;
|
||||
core::int y5 = await x5;
|
||||
asy::Future<core::int> y6 = await x6;
|
||||
FutureOr<core::int>y7 = await x7;
|
||||
self::MyFuture y8 = await x8;
|
||||
core::int y5 = await x5 /* runtimeCheckType= asy::Future<core::int> */ ;
|
||||
asy::Future<core::int> y6 = await x6 /* runtimeCheckType= asy::Future<asy::Future<core::int>> */ ;
|
||||
FutureOr<core::int>y7 = await x7 /* runtimeCheckType= asy::Future<FutureOr<core::int>> */ ;
|
||||
self::MyFuture y8 = await x8 /* runtimeCheckType= asy::Future<self::MyFuture> */ ;
|
||||
core::int y9 = await x9;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -7,6 +7,6 @@ import "dart:async";
|
|||
|
||||
static method main() → asy::Future<dynamic> async /* futureValueType= dynamic */ {
|
||||
dynamic d;
|
||||
core::List<core::int> l0 = await<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int];
|
||||
core::List<core::int> l0 = await<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int] /* runtimeCheckType= asy::Future<core::List<core::int>> */ ;
|
||||
core::List<core::int> l1 = await asy::Future::value<core::List<core::int>>(<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int]);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@ import "dart:async";
|
|||
|
||||
static method main() → asy::Future<dynamic> async /* futureValueType= dynamic */ {
|
||||
dynamic d;
|
||||
core::List<core::int> l0 = await<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int];
|
||||
core::List<core::int> l0 = await<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int] /* runtimeCheckType= asy::Future<core::List<core::int>> */ ;
|
||||
core::List<core::int> l1 = await asy::Future::value<core::List<core::int>>(<core::int>[d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int]);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@ import "dart:async";
|
|||
|
||||
static method main() → asy::Future<dynamic> async /* futureValueType= dynamic */ {
|
||||
dynamic d;
|
||||
core::List<core::int> l0 = await core::_GrowableList::_literal1<core::int>(d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int);
|
||||
core::List<core::int> l0 = await core::_GrowableList::_literal1<core::int>(d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) /* runtimeCheckType= asy::Future<core::List<core::int>> */ ;
|
||||
core::List<core::int> l1 = await asy::Future::value<core::List<core::int>>(core::_GrowableList::_literal1<core::int>(d as{TypeError,ForDynamic,ForNonNullableByDefault} core::int));
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_2.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_2.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_2.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_3.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_3.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_3.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_4.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_4.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(self::MyFuture<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_4.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_5.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_5.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
? 2
|
||||
^" in (await x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_5.dart:30:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_6.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_6.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -49,7 +49,7 @@ static method test(asy::Future<core::bool> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
|
||||
^" in (await x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (await x /* runtimeCheckType= asy::Future<core::bool> */ ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::bool) → FutureOr<core::int>, {onError: core::Function?}) → asy::Future<core::int>};
|
||||
asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_conditional2_6.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::bool*>* f;
|
||||
self::MyFuture<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
self::MyFuture<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await new self::MyFuture::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : new self::MyFuture::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
asy::Future<core::bool*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{asy::Future::then}<core::int*>((core::bool* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => x ?{core::int*} 2 : await asy::Future::value<core::int*>(3)){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (await x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
return (await x /* runtimeCheckType= asy::Future<core::bool*>* */ ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* => (x ?{core::Object*} 2 : asy::Future::value<core::int*>(3)) as{TypeError} FutureOr<core::int*>*){((core::bool*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* asy::Future<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{asy::Future::then}<core::int*>((core::bool* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::int*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::int* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => let final core::int* #t1 = x in #t1 == null ?{core::int*} await asy::Future::value<core::int*>(3) : #t1){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (let final core::int* #t2 = await x in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
return (let final core::int* #t2 = await x /* runtimeCheckType= asy::Future<core::int*>* */ in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* => (let final core::int* #t3 = x in #t3 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t3) as{TypeError} FutureOr<core::int*>*){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::int*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::int* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => let final core::int* #t1 = x in #t1 == null ?{core::int*} await asy::Future::value<core::int*>(3) : #t1){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (let final core::int* #t2 = await x in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
return (let final core::int* #t2 = await x /* runtimeCheckType= asy::Future<core::int*>* */ in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* => (let final core::int* #t3 = x in #t3 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t3) as{TypeError} FutureOr<core::int*>*){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -36,7 +36,7 @@ static method test() → void {
|
|||
self::MyFuture<core::int*>* f;
|
||||
asy::Future<core::int*>* t1 = f.{self::MyFuture::then}<core::int*>((core::int* x) → asy::Future<core::int*>* async /* futureValueType= core::int* */ => let final core::int* #t1 = x in #t1 == null ?{core::int*} await asy::Future::value<core::int*>(3) : #t1){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t2 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* async /* futureValueType= core::int* */ {
|
||||
return (let final core::int* #t2 = await x in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
return (let final core::int* #t2 = await x /* runtimeCheckType= asy::Future<core::int*>* */ in #t2 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t2) as{TypeError} FutureOr<core::int*>*;
|
||||
}){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t5 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* => (let final core::int* #t3 = x in #t3 == null ?{core::Object*} asy::Future::value<core::int*>(3) : #t3) as{TypeError} FutureOr<core::int*>*){((core::int*) →* FutureOr<core::int*>*, {onError: core::Function*}) →* self::MyFuture<core::int*>*};
|
||||
asy::Future<core::int*>* t6 = f.{self::MyFuture::then}<core::int*>((core::int* x) → FutureOr<core::int*>* {
|
||||
|
|
|
@ -65,7 +65,7 @@ static method test(self::MyFuture<core::int> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future<int>.value(3);
|
||||
^" in (let final core::int #t2 = await x in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (let final core::int #t2 = await x /* runtimeCheckType= asy::Future<core::int> */ in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::int) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::int x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -65,7 +65,7 @@ static method test(self::MyFuture<core::int> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future<int>.value(3);
|
||||
^" in (let final core::int #t2 = await x in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (let final core::int #t2 = await x /* runtimeCheckType= asy::Future<core::int> */ in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::int) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::int x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -65,7 +65,7 @@ static method test(self::MyFuture<core::int> f) → void {
|
|||
- 'Object' is from 'dart:core'.
|
||||
- 'Future' is from 'dart:async'.
|
||||
return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future<int>.value(3);
|
||||
^" in (let final core::int #t2 = await x in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
^" in (let final core::int #t2 = await x /* runtimeCheckType= asy::Future<core::int> */ in #t2 == null ?{core::Object} asy::Future::value<core::int>(3) : #t2) as{TypeError,ForNonNullableByDefault} core::int;
|
||||
}){((core::int) → FutureOr<core::int>, {onError: core::Function?}) → self::MyFuture<core::int>};
|
||||
asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::int x) → FutureOr<core::int> => invalid-expression "pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:13: Error: A value of type 'Object' can't be returned from a function with return type 'FutureOr<int>'.
|
||||
- 'Object' is from 'dart:core'.
|
||||
|
|
|
@ -8,6 +8,6 @@ import "dart:async";
|
|||
static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
|
||||
return x;
|
||||
static method test(asy::Future<core::String> f) → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String s = await self::id<FutureOr<core::String>>(f);
|
||||
core::String s = await self::id<FutureOr<core::String>>(f) /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -8,6 +8,6 @@ import "dart:async";
|
|||
static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
|
||||
return x;
|
||||
static method test(asy::Future<core::String> f) → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String s = await self::id<FutureOr<core::String>>(f);
|
||||
core::String s = await self::id<FutureOr<core::String>>(f) /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -8,6 +8,6 @@ import "dart:async";
|
|||
static method id<T extends core::Object? = dynamic>(self::id::T% x) → self::id::T%
|
||||
return x;
|
||||
static method test(asy::Future<core::String> f) → dynamic async /* futureValueType= dynamic */ {
|
||||
core::String s = await self::id<FutureOr<core::String>>(f);
|
||||
core::String s = await self::id<FutureOr<core::String>>(f) /* runtimeCheckType= asy::Future<core::String> */ ;
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
|
|
@ -153,7 +153,7 @@ static method fisk() → dynamic async /* futureValueType= dynamic */ {
|
|||
return #s2 = s2#param;
|
||||
lowered has-declared-initializer core::Function? #f;
|
||||
function #f#get() → core::Function
|
||||
return let final core::Function? #t8 = #f in #t8 == null ?{core::Function} #f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() : #t8{core::Function};
|
||||
return let final core::Function? #t8 = #f in #t8 == null ?{core::Function} #f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() /* runtimeCheckType= asy::Future<dynamic> */ : #t8{core::Function};
|
||||
function #f#set(core::Function f#param) → dynamic
|
||||
return #f = f#param;
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ static method fisk() → dynamic async /* futureValueType= dynamic */ {
|
|||
return #s2 = s2#param;
|
||||
lowered has-declared-initializer core::Function? #f;
|
||||
function #f#get() → core::Function
|
||||
return let final core::Function? #t9 = #f in #t9 == null ?{core::Function} #f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() : #t9{core::Function};
|
||||
return let final core::Function? #t9 = #f in #t9 == null ?{core::Function} #f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() /* runtimeCheckType= asy::Future<dynamic> */ : #t9{core::Function};
|
||||
function #f#set(core::Function f#param) → dynamic
|
||||
return #f = f#param;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ static method fisk() → dynamic async /* futureValueType= dynamic */ {
|
|||
lowered core::bool #f#isSet = false;
|
||||
function #f#get() → core::Function {
|
||||
if(!#f#isSet) {
|
||||
#f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest();
|
||||
#f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
#f#isSet = true;
|
||||
}
|
||||
return #f{core::Function};
|
||||
|
|
|
@ -191,7 +191,7 @@ static method fisk() → dynamic async /* futureValueType= dynamic */ {
|
|||
lowered core::bool #f#isSet = false;
|
||||
function #f#get() → core::Function {
|
||||
if(!#f#isSet) {
|
||||
#f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest();
|
||||
#f = () → asy::Future<dynamic> async /* futureValueType= dynamic */ => await self::hest() /* runtimeCheckType= asy::Future<dynamic> */ ;
|
||||
#f#isSet = true;
|
||||
}
|
||||
return #f{core::Function};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue