mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:27:43 +00:00
[dart2js] Fix and rebase impact test for nnbd.
Change-Id: I545f5df00c4e8c1ae6a60ec6a6c4458c5d53db78 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146360 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Joshua Litt <joshualitt@google.com>
This commit is contained in:
parent
3391be2d16
commit
fb5ebf6a09
|
@ -218,7 +218,7 @@ class RuntimeTypeUse {
|
|||
case RuntimeTypeUseKind.equals:
|
||||
sb.write('equals:');
|
||||
sb.write(receiverType);
|
||||
sb.write('/');
|
||||
sb.write('==');
|
||||
sb.write(argumentType);
|
||||
break;
|
||||
case RuntimeTypeUseKind.unknown:
|
||||
|
|
|
@ -11,7 +11,7 @@ main() {
|
|||
promoted(null);
|
||||
}
|
||||
|
||||
/*member: explicitAs:
|
||||
/*spec:nnbd-off.member: explicitAs:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -51,13 +51,56 @@ main() {
|
|||
inst:JSBool,
|
||||
param:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: explicitAs:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:String*]
|
||||
*/
|
||||
explicitAs(String i) {
|
||||
i.length;
|
||||
// ignore: unnecessary_cast
|
||||
return i as String;
|
||||
}
|
||||
|
||||
/*member: implicitAs:
|
||||
/*spec:nnbd-off.member: implicitAs:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -97,6 +140,49 @@ explicitAs(String i) {
|
|||
inst:JSBool,
|
||||
param:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: implicitAs:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:String*]
|
||||
*/
|
||||
String implicitAs(String i) {
|
||||
dynamic j = i;
|
||||
i.length;
|
||||
|
@ -104,7 +190,7 @@ String implicitAs(String i) {
|
|||
return j;
|
||||
}
|
||||
|
||||
/*member: promoted:
|
||||
/*spec:nnbd-off.member: promoted:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -145,6 +231,50 @@ String implicitAs(String i) {
|
|||
inst:JSNull,
|
||||
is:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: promoted:
|
||||
dynamic=[String.length],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
is:String*]
|
||||
*/
|
||||
String promoted(dynamic i) {
|
||||
if (i is! String) return null;
|
||||
i.length;
|
||||
|
|
|
@ -219,7 +219,7 @@ testAnonymousAsyncStar() {
|
|||
return () async* {};
|
||||
}
|
||||
|
||||
/*member: testAsyncForIn:
|
||||
/*spec:nnbd-off.member: testAsyncForIn:
|
||||
dynamic=[
|
||||
_StreamIterator.cancel(0),
|
||||
_StreamIterator.current,
|
||||
|
@ -271,12 +271,67 @@ testAnonymousAsyncStar() {
|
|||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testAsyncForIn:
|
||||
dynamic=[
|
||||
_StreamIterator.cancel(0),
|
||||
_StreamIterator.current,
|
||||
_StreamIterator.moveNext(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
StreamIterator.(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_asyncAwait(2),
|
||||
_asyncRethrow(2),
|
||||
_asyncReturn(2),
|
||||
_asyncStartSync(2),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
_makeAsyncAwaitCompleter<dynamic>(0),
|
||||
_wrapJsFunctionForAsync(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
impl:Stream<dynamic>*,
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
testAsyncForIn(o) async {
|
||||
// ignore: UNUSED_LOCAL_VARIABLE
|
||||
await for (var e in o) {}
|
||||
}
|
||||
|
||||
/*member: testAsyncForInTyped:
|
||||
/*spec:nnbd-off.member: testAsyncForInTyped:
|
||||
dynamic=[
|
||||
_StreamIterator.cancel(0),
|
||||
_StreamIterator.current,
|
||||
|
@ -329,6 +384,62 @@ testAsyncForIn(o) async {
|
|||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testAsyncForInTyped:
|
||||
dynamic=[
|
||||
_StreamIterator.cancel(0),
|
||||
_StreamIterator.current,
|
||||
_StreamIterator.moveNext(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
StreamIterator.(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_asyncAwait(2),
|
||||
_asyncRethrow(2),
|
||||
_asyncReturn(2),
|
||||
_asyncStartSync(2),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
_makeAsyncAwaitCompleter<dynamic>(0),
|
||||
_wrapJsFunctionForAsync(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
impl:Stream<dynamic>*,
|
||||
impl:int*,
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
testAsyncForInTyped(o) async {
|
||||
// ignore: UNUSED_LOCAL_VARIABLE
|
||||
await for (int e in o) {}
|
||||
|
|
|
@ -139,7 +139,7 @@ class ForwardingConstructorClass = ForwardingConstructorSuperClass
|
|||
testForwardingConstructor() => new ForwardingConstructorClass(null);
|
||||
|
||||
class ForwardingConstructorTypedSuperClass {
|
||||
/*member: ForwardingConstructorTypedSuperClass.:
|
||||
/*spec:nnbd-off.member: ForwardingConstructorTypedSuperClass.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
|
@ -179,6 +179,49 @@ class ForwardingConstructorTypedSuperClass {
|
|||
inst:JSBool,
|
||||
param:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: ForwardingConstructorTypedSuperClass.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:int*]
|
||||
*/
|
||||
ForwardingConstructorTypedSuperClass(int arg);
|
||||
}
|
||||
|
||||
|
@ -192,7 +235,7 @@ class ForwardingConstructorTypedClass = ForwardingConstructorTypedSuperClass
|
|||
testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null);
|
||||
|
||||
class ForwardingConstructorGenericSuperClass<T> {
|
||||
/*member: ForwardingConstructorGenericSuperClass.:
|
||||
/*spec:nnbd-off.member: ForwardingConstructorGenericSuperClass.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
|
@ -244,6 +287,61 @@ class ForwardingConstructorGenericSuperClass<T> {
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:ForwardingConstructorGenericSuperClass.T]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: ForwardingConstructorGenericSuperClass.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
checkSubtypeOfRuntimeType(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:ForwardingConstructorGenericSuperClass.T*]
|
||||
*/
|
||||
ForwardingConstructorGenericSuperClass(T arg);
|
||||
}
|
||||
|
||||
|
@ -273,7 +371,7 @@ enum Enum { A }
|
|||
*/
|
||||
testEnum() => Enum.A;
|
||||
|
||||
/*member: staticGenericMethod:
|
||||
/*spec:nnbd-off.member: staticGenericMethod:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -326,17 +424,85 @@ testEnum() => Enum.A;
|
|||
param:Object,
|
||||
param:staticGenericMethod.T]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: staticGenericMethod:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
checkSubtypeOfRuntimeType(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
inst:List<staticGenericMethod.T*>,
|
||||
param:Object*,
|
||||
param:staticGenericMethod.T*]
|
||||
*/
|
||||
List<T> staticGenericMethod<T>(T arg) => [arg];
|
||||
|
||||
/*member: testStaticGenericMethod:
|
||||
/*spec:nnbd-off.member: testStaticGenericMethod:
|
||||
static=[staticGenericMethod<bool>(1)],
|
||||
type=[inst:JSBool]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testStaticGenericMethod:
|
||||
static=[staticGenericMethod<bool*>(1)],
|
||||
type=[inst:JSBool]
|
||||
*/
|
||||
testStaticGenericMethod() {
|
||||
staticGenericMethod<bool>(true);
|
||||
}
|
||||
|
||||
/*member: testInstanceGenericMethod:dynamic=[exact:GenericClass.genericMethod<bool>(1)],static=[GenericClass.generative(0),checkTypeBound(4),throwTypeError(1)],type=[inst:JSBool]*/
|
||||
/*spec:nnbd-off.member: testInstanceGenericMethod:dynamic=[exact:GenericClass.genericMethod<bool>(1)],static=[GenericClass.generative(0),checkTypeBound(4),throwTypeError(1)],type=[inst:JSBool]*/
|
||||
/*spec:nnbd-sdk.member: testInstanceGenericMethod:
|
||||
dynamic=[exact:GenericClass.genericMethod<bool*>(1)],
|
||||
static=[
|
||||
GenericClass.generative(0),
|
||||
checkTypeBound(4),
|
||||
throwTypeError(1)],
|
||||
type=[inst:JSBool]
|
||||
*/
|
||||
testInstanceGenericMethod() {
|
||||
new GenericClass<int, String>.generative().genericMethod<bool>(false);
|
||||
}
|
||||
|
@ -372,7 +538,7 @@ class Class {
|
|||
class GenericClass<X, Y> {
|
||||
const GenericClass.generative();
|
||||
|
||||
/*member: GenericClass.genericMethod:
|
||||
/*spec:nnbd-off.member: GenericClass.genericMethod:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -426,6 +592,63 @@ class GenericClass<X, Y> {
|
|||
param:Object,
|
||||
param:genericMethod.T]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: GenericClass.genericMethod:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
checkSubtypeOfRuntimeType(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSNull,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
inst:Map<GenericClass.X*,genericMethod.T*>,
|
||||
param:Object*,
|
||||
param:genericMethod.T*]
|
||||
*/
|
||||
Map<X, T> genericMethod<T>(T arg) => {null: arg};
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ const instanceConstantField = const Class(true, false);
|
|||
|
||||
const typeLiteralField = String;
|
||||
|
||||
/*member: id:
|
||||
/*spec:nnbd-off.member: id:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -96,6 +96,61 @@ const typeLiteralField = String;
|
|||
param:Object,
|
||||
param:id.T]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: id:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
checkSubtypeOfRuntimeType(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:Object*,
|
||||
param:id.T*]
|
||||
*/
|
||||
T id<T>(T t) => t;
|
||||
|
||||
const int Function(int) _instantiation = id;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import 'lib.dart';
|
||||
import 'lib.dart' deferred as defer;
|
||||
|
||||
/*member: main:static=**/
|
||||
/*member: main:static=%*/
|
||||
main() {
|
||||
nullLiteral();
|
||||
boolLiteral();
|
||||
|
@ -91,7 +91,10 @@ stringLiteral() {
|
|||
/*member: symbolLiteral:static=[Symbol.(1)],type=[inst:Symbol]*/
|
||||
symbolLiteral() => #foo;
|
||||
|
||||
/*member: listLiteral:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-off.member: listLiteral:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-sdk.member: listLiteral:type=[
|
||||
inst:JSBool,
|
||||
inst:List<bool*>]*/
|
||||
listLiteral() => const [true, false];
|
||||
|
||||
/*member: mapLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
|
||||
|
@ -109,7 +112,16 @@ setLiteral() => const {true, false};
|
|||
*/
|
||||
instanceConstant() => const Class(true, false);
|
||||
|
||||
/*member: typeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/
|
||||
/*spec:nnbd-off.member: typeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/
|
||||
/*spec:nnbd-sdk.member: typeLiteral:
|
||||
static=[
|
||||
createRuntimeType(1),
|
||||
typeLiteral(1)],
|
||||
type=[
|
||||
inst:Type,
|
||||
inst:_Type,
|
||||
lit:String*]
|
||||
*/
|
||||
typeLiteral() {
|
||||
const dynamic local = String;
|
||||
return local;
|
||||
|
@ -151,7 +163,10 @@ stringLiteralRef() => stringLiteralField;
|
|||
/*member: symbolLiteralRef:static=[Symbol.(1)],type=[inst:Symbol]*/
|
||||
symbolLiteralRef() => symbolLiteralField;
|
||||
|
||||
/*member: listLiteralRef:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-off.member: listLiteralRef:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-sdk.member: listLiteralRef:type=[
|
||||
inst:JSBool,
|
||||
inst:List<bool*>]*/
|
||||
listLiteralRef() => listLiteralField;
|
||||
|
||||
/*member: mapLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
|
||||
|
@ -169,7 +184,16 @@ setLiteralRef() => setLiteralField;
|
|||
*/
|
||||
instanceConstantRef() => instanceConstantField;
|
||||
|
||||
/*member: typeLiteralRef:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/
|
||||
/*spec:nnbd-off.member: typeLiteralRef:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String]*/
|
||||
/*spec:nnbd-sdk.member: typeLiteralRef:
|
||||
static=[
|
||||
createRuntimeType(1),
|
||||
typeLiteral(1)],
|
||||
type=[
|
||||
inst:Type,
|
||||
inst:_Type,
|
||||
lit:String*]
|
||||
*/
|
||||
typeLiteralRef() => typeLiteralField;
|
||||
|
||||
/*member: instantiationRef:static=[closureFunctionType(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
|
||||
|
@ -201,7 +225,10 @@ stringLiteralDeferred() => defer.stringLiteralField;
|
|||
symbolLiteralDeferred() => defer.symbolLiteralField;
|
||||
|
||||
// TODO(johnniwinther): Should we record that this is deferred?
|
||||
/*member: listLiteralDeferred:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-off.member: listLiteralDeferred:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-sdk.member: listLiteralDeferred:type=[
|
||||
inst:JSBool,
|
||||
inst:List<bool*>]*/
|
||||
listLiteralDeferred() => defer.listLiteralField;
|
||||
|
||||
// TODO(johnniwinther): Should we record that this is deferred?
|
||||
|
@ -222,7 +249,16 @@ setLiteralDeferred() => defer.setLiteralField;
|
|||
*/
|
||||
instanceConstantDeferred() => defer.instanceConstantField;
|
||||
|
||||
/*member: typeLiteralDeferred:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String{defer}]*/
|
||||
/*spec:nnbd-off.member: typeLiteralDeferred:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:String{defer}]*/
|
||||
/*spec:nnbd-sdk.member: typeLiteralDeferred:
|
||||
static=[
|
||||
createRuntimeType(1),
|
||||
typeLiteral(1)],
|
||||
type=[
|
||||
inst:Type,
|
||||
inst:_Type,
|
||||
lit:String*{defer}]
|
||||
*/
|
||||
typeLiteralDeferred() => defer.typeLiteralField;
|
||||
|
||||
/*member: instantiationDeferred:static=[closureFunctionType(1),id{defer},instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
|
||||
|
|
|
@ -111,7 +111,8 @@ testConstRedirectingFactoryInvoke() {
|
|||
const Class.redirect();
|
||||
}
|
||||
|
||||
/*member: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass<int,String>]*/
|
||||
/*spec:nnbd-off.member: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass<int,String>]*/
|
||||
/*spec:nnbd-sdk.member: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass<int*,String*>]*/
|
||||
testConstRedirectingFactoryInvokeGeneric() {
|
||||
const GenericClass<int, String>.redirect();
|
||||
}
|
||||
|
@ -154,7 +155,7 @@ class GenericClass<X, Y> {
|
|||
/*member: GenericClass.generative:static=[Object.(0)]*/
|
||||
const GenericClass.generative();
|
||||
|
||||
/*member: GenericClass.fact:
|
||||
/*spec:nnbd-off.member: GenericClass.fact:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -194,6 +195,49 @@ class GenericClass<X, Y> {
|
|||
inst:JSNull,
|
||||
param:Object]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: GenericClass.fact:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:Object*]
|
||||
*/
|
||||
factory GenericClass.fact() => null;
|
||||
|
||||
const factory GenericClass.redirect() = GenericClass<X, Y>.generative;
|
||||
|
|
|
@ -69,7 +69,7 @@ notEffectivelyFinalList() {
|
|||
/*member: _method1:type=[inst:JSNull]*/
|
||||
num _method1() => null;
|
||||
|
||||
/*member: effectivelyFinalPromoted:
|
||||
/*spec:nnbd-off.member: effectivelyFinalPromoted:
|
||||
dynamic=[
|
||||
int.+,
|
||||
num.+],
|
||||
|
@ -118,6 +118,58 @@ num _method1() => null;
|
|||
inst:JSUInt32,
|
||||
is:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: effectivelyFinalPromoted:
|
||||
dynamic=[
|
||||
int.+,
|
||||
num.+],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
_method1(0),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSDouble,
|
||||
inst:JSInt,
|
||||
inst:JSNumber,
|
||||
inst:JSPositiveInt,
|
||||
inst:JSUInt31,
|
||||
inst:JSUInt32,
|
||||
is:int*]
|
||||
*/
|
||||
effectivelyFinalPromoted() {
|
||||
dynamic c = _method1();
|
||||
c + 0;
|
||||
|
@ -129,7 +181,7 @@ effectivelyFinalPromoted() {
|
|||
/*member: _method2:type=[inst:JSNull]*/
|
||||
String _method2() => null;
|
||||
|
||||
/*member: effectivelyFinalPromotedInvalid:
|
||||
/*spec:nnbd-off.member: effectivelyFinalPromotedInvalid:
|
||||
dynamic=[
|
||||
String.+,
|
||||
int.+],
|
||||
|
@ -179,6 +231,59 @@ String _method2() => null;
|
|||
inst:JSUInt32,
|
||||
is:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: effectivelyFinalPromotedInvalid:
|
||||
dynamic=[
|
||||
String.+,
|
||||
int.+],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
_method2(0),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSDouble,
|
||||
inst:JSInt,
|
||||
inst:JSNumber,
|
||||
inst:JSPositiveInt,
|
||||
inst:JSString,
|
||||
inst:JSUInt31,
|
||||
inst:JSUInt32,
|
||||
is:int*]
|
||||
*/
|
||||
effectivelyFinalPromotedInvalid() {
|
||||
dynamic c = _method2();
|
||||
c + '';
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@ class B<S, U> {}
|
|||
/*member: C.:static=[Object.(0)]*/
|
||||
class C implements A<int>, B<String, bool> {}
|
||||
|
||||
/*member: testA:
|
||||
/*spec:nnbd-off.member: testA:
|
||||
dynamic=[call<A.T>(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -68,9 +68,66 @@ class C implements A<int>, B<String, bool> {}
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
is:A<A.T>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testA:
|
||||
dynamic=[call<A.T>(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
extractTypeArguments<A<dynamic>*>(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
impl:A<dynamic>*,
|
||||
impl:Function,
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
is:A<A.T>]
|
||||
*/
|
||||
testA(c, f) => extractTypeArguments<A>(c, f);
|
||||
|
||||
/*member: testB:
|
||||
/*spec:nnbd-off.member: testB:
|
||||
dynamic=[call<B.S,B.U>(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -124,6 +181,63 @@ testA(c, f) => extractTypeArguments<A>(c, f);
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
is:B<B.S,B.U>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testB:
|
||||
dynamic=[call<B.S,B.U>(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
extractTypeArguments<B<dynamic,dynamic>*>(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
impl:B<dynamic,dynamic>*,
|
||||
impl:Function,
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
is:B<B.S,B.U>]
|
||||
*/
|
||||
testB(c, f) => extractTypeArguments<B>(c, f);
|
||||
|
||||
/*member: main:static=[C.(0),testA(2),testB(2)],type=[inst:JSNull]*/
|
||||
|
|
|
@ -6,7 +6,23 @@
|
|||
|
||||
import "dart:async";
|
||||
|
||||
/*member: main:dynamic=[runtimeType],runtimeType=[unknown:FutureOr<int>],static=[Future.value(1),checkTypeBound(4),print(1),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
|
||||
/*spec:nnbd-off.member: main:dynamic=[runtimeType],runtimeType=[unknown:FutureOr<int>],static=[Future.value(1),checkTypeBound(4),print(1),throwTypeError(1)],type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
|
||||
/*spec:nnbd-sdk.member: main:
|
||||
dynamic=[runtimeType],
|
||||
runtimeType=[unknown:FutureOr<int*>*],
|
||||
static=[
|
||||
Future.value(1),
|
||||
checkTypeBound(4),
|
||||
print(1),
|
||||
throwTypeError(1)],
|
||||
type=[
|
||||
inst:JSDouble,
|
||||
inst:JSInt,
|
||||
inst:JSNumber,
|
||||
inst:JSPositiveInt,
|
||||
inst:JSUInt31,
|
||||
inst:JSUInt32]
|
||||
*/
|
||||
@pragma('dart2js:disableFinal')
|
||||
void main() {
|
||||
FutureOr<int> i = new Future<int>.value(0);
|
||||
|
|
|
@ -30,7 +30,7 @@ main() {
|
|||
testGenericClass();
|
||||
}
|
||||
|
||||
/*member: testDefaultValuesPositional:
|
||||
/*spec:nnbd-off.member: testDefaultValuesPositional:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -69,9 +69,51 @@ main() {
|
|||
inst:JSBool,
|
||||
param:bool]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testDefaultValuesPositional:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:bool*]
|
||||
*/
|
||||
testDefaultValuesPositional([bool value = false]) {}
|
||||
|
||||
/*member: testDefaultValuesNamed:
|
||||
/*spec:nnbd-off.member: testDefaultValuesNamed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -110,6 +152,48 @@ testDefaultValuesPositional([bool value = false]) {}
|
|||
inst:JSBool,
|
||||
param:bool]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testDefaultValuesNamed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:bool*]
|
||||
*/
|
||||
testDefaultValuesNamed({bool value: false}) {}
|
||||
|
||||
class ClassFieldInitializer1 {
|
||||
|
@ -162,7 +246,7 @@ testFieldInitializer3() {
|
|||
|
||||
/*member: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/
|
||||
class ClassInstanceFieldWithInitializer {
|
||||
/*member: ClassInstanceFieldWithInitializer.field:
|
||||
/*spec:nnbd-off.member: ClassInstanceFieldWithInitializer.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -201,6 +285,48 @@ class ClassInstanceFieldWithInitializer {
|
|||
inst:JSBool,
|
||||
param:bool]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: ClassInstanceFieldWithInitializer.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:bool*]
|
||||
*/
|
||||
var field = false;
|
||||
}
|
||||
|
||||
|
@ -209,7 +335,7 @@ testInstanceFieldWithInitializer() => new ClassInstanceFieldWithInitializer();
|
|||
|
||||
/*member: ClassInstanceFieldTyped.:static=[Object.(0)]*/
|
||||
class ClassInstanceFieldTyped {
|
||||
/*member: ClassInstanceFieldTyped.field:
|
||||
/*spec:nnbd-off.member: ClassInstanceFieldTyped.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -249,6 +375,49 @@ class ClassInstanceFieldTyped {
|
|||
inst:JSNull,
|
||||
param:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: ClassInstanceFieldTyped.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:int*]
|
||||
*/
|
||||
int field;
|
||||
}
|
||||
|
||||
|
@ -275,7 +444,7 @@ class ClassSuperInitializer extends ClassThisInitializer {
|
|||
testSuperInitializer() => new ClassSuperInitializer();
|
||||
|
||||
class ClassGeneric<T> {
|
||||
/*member: ClassGeneric.:
|
||||
/*spec:nnbd-off.member: ClassGeneric.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
|
@ -327,6 +496,61 @@ class ClassGeneric<T> {
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:ClassGeneric.T]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: ClassGeneric.:
|
||||
static=[
|
||||
Object.(0),
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
checkSubtypeOfRuntimeType(2),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:ClassGeneric.T*]
|
||||
*/
|
||||
ClassGeneric(T arg);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -117,7 +117,7 @@ testTopLevelInvoke() {
|
|||
topLevelFunction3(15, c: 16, b: 17);
|
||||
}
|
||||
|
||||
/*member: topLevelFunction1Typed:
|
||||
/*spec:nnbd-off.member: topLevelFunction1Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -156,9 +156,51 @@ testTopLevelInvoke() {
|
|||
inst:JSBool,
|
||||
param:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunction1Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:int*]
|
||||
*/
|
||||
void topLevelFunction1Typed(int a) {}
|
||||
|
||||
/*member: topLevelFunction2Typed:
|
||||
/*spec:nnbd-off.member: topLevelFunction2Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -200,9 +242,54 @@ void topLevelFunction1Typed(int a) {}
|
|||
param:double,
|
||||
param:num]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunction2Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:String*,
|
||||
param:double*,
|
||||
param:num*]
|
||||
*/
|
||||
int topLevelFunction2Typed(String a, [num b, double c]) => null;
|
||||
|
||||
/*member: topLevelFunction3Typed:
|
||||
/*spec:nnbd-off.member: topLevelFunction3Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -255,11 +342,67 @@ int topLevelFunction2Typed(String a, [num b, double c]) => null;
|
|||
param:Map<String,bool>,
|
||||
param:bool]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunction3Typed:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSNull,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:List<int*>*,
|
||||
param:Map<String*,bool*>*,
|
||||
param:bool*]
|
||||
*/
|
||||
double topLevelFunction3Typed(bool a, {List<int> b, Map<String, bool> c}) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*member: testTopLevelInvokeTyped:
|
||||
/*spec:nnbd-off.member: testTopLevelInvokeTyped:
|
||||
static=[
|
||||
topLevelFunction1Typed(1),
|
||||
topLevelFunction2Typed(1),
|
||||
|
@ -283,6 +426,30 @@ double topLevelFunction3Typed(bool a, {List<int> b, Map<String, bool> c}) {
|
|||
inst:List<int>,
|
||||
inst:Map<String,bool>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testTopLevelInvokeTyped:
|
||||
static=[
|
||||
topLevelFunction1Typed(1),
|
||||
topLevelFunction2Typed(1),
|
||||
topLevelFunction2Typed(2),
|
||||
topLevelFunction2Typed(3),
|
||||
topLevelFunction3Typed(1),
|
||||
topLevelFunction3Typed(1,b),
|
||||
topLevelFunction3Typed(1,b,c),
|
||||
topLevelFunction3Typed(1,b,c),
|
||||
topLevelFunction3Typed(1,c)],
|
||||
type=[
|
||||
inst:JSBool,
|
||||
inst:JSDouble,
|
||||
inst:JSInt,
|
||||
inst:JSNull,
|
||||
inst:JSNumber,
|
||||
inst:JSPositiveInt,
|
||||
inst:JSString,
|
||||
inst:JSUInt31,
|
||||
inst:JSUInt32,
|
||||
inst:List<int*>,
|
||||
inst:Map<String*,bool*>]
|
||||
*/
|
||||
testTopLevelInvokeTyped() {
|
||||
topLevelFunction1Typed(0);
|
||||
topLevelFunction2Typed('1');
|
||||
|
@ -295,7 +462,7 @@ testTopLevelInvokeTyped() {
|
|||
topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
|
||||
}
|
||||
|
||||
/*member: topLevelFunctionTyped1:
|
||||
/*spec:nnbd-off.member: topLevelFunctionTyped1:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -345,9 +512,62 @@ testTopLevelInvokeTyped() {
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num)]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunctionTyped1:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num*)*]
|
||||
*/
|
||||
topLevelFunctionTyped1(void a(num b)) {}
|
||||
|
||||
/*member: topLevelFunctionTyped2:
|
||||
/*spec:nnbd-off.member: topLevelFunctionTyped2:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -397,9 +617,62 @@ topLevelFunctionTyped1(void a(num b)) {}
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num,[String])]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunctionTyped2:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num*,[String*])*]
|
||||
*/
|
||||
topLevelFunctionTyped2(void a(num b, [String c])) {}
|
||||
|
||||
/*member: topLevelFunctionTyped3:
|
||||
/*spec:nnbd-off.member: topLevelFunctionTyped3:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -449,9 +722,62 @@ topLevelFunctionTyped2(void a(num b, [String c])) {}
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num,{String c,int d})]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunctionTyped3:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num*,{String* c,int* d})*]
|
||||
*/
|
||||
topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
|
||||
|
||||
/*member: topLevelFunctionTyped4:
|
||||
/*spec:nnbd-off.member: topLevelFunctionTyped4:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -501,6 +827,59 @@ topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num,{int c,String d})]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFunctionTyped4:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(num*,{int* c,String* d})*]
|
||||
*/
|
||||
topLevelFunctionTyped4(void a(num b, {String d, int c})) {}
|
||||
|
||||
/*member: testTopLevelFunctionTyped:
|
||||
|
@ -539,7 +918,7 @@ set topLevelSetter(_) {}
|
|||
/*member: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/
|
||||
testTopLevelSetterSet() => topLevelSetter = null;
|
||||
|
||||
/*member: topLevelSetterTyped=:
|
||||
/*spec:nnbd-off.member: topLevelSetterTyped=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -578,6 +957,48 @@ testTopLevelSetterSet() => topLevelSetter = null;
|
|||
inst:JSBool,
|
||||
param:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelSetterTyped=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:int*]
|
||||
*/
|
||||
void set topLevelSetterTyped(int value) {}
|
||||
|
||||
/*member: testTopLevelSetterSetTyped:static=[set:topLevelSetterTyped],type=[inst:JSNull]*/
|
||||
|
@ -606,7 +1027,7 @@ final topLevelFieldFinal = topLevelFunction1(null);
|
|||
/*member: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
|
||||
testTopLevelFieldFinal() => topLevelFieldFinal;
|
||||
|
||||
/*member: topLevelFieldTyped:
|
||||
/*spec:nnbd-off.member: topLevelFieldTyped:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -646,12 +1067,55 @@ testTopLevelFieldFinal() => topLevelFieldFinal;
|
|||
inst:JSNull,
|
||||
param:int]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFieldTyped:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:int*]
|
||||
*/
|
||||
int topLevelFieldTyped;
|
||||
|
||||
/*member: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/
|
||||
testTopLevelFieldTyped() => topLevelFieldTyped;
|
||||
|
||||
/*member: topLevelFieldGeneric1:
|
||||
/*spec:nnbd-off.member: topLevelFieldGeneric1:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -691,12 +1155,55 @@ testTopLevelFieldTyped() => topLevelFieldTyped;
|
|||
inst:JSNull,
|
||||
param:GenericClass<dynamic,dynamic>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFieldGeneric1:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:GenericClass<dynamic,dynamic>*]
|
||||
*/
|
||||
GenericClass topLevelFieldGeneric1;
|
||||
|
||||
/*member: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/
|
||||
testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
|
||||
|
||||
/*member: topLevelFieldGeneric2:
|
||||
/*spec:nnbd-off.member: topLevelFieldGeneric2:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -736,12 +1243,55 @@ testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
|
|||
inst:JSNull,
|
||||
param:GenericClass<dynamic,dynamic>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFieldGeneric2:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
param:GenericClass<dynamic,dynamic>*]
|
||||
*/
|
||||
GenericClass<dynamic, dynamic> topLevelFieldGeneric2;
|
||||
|
||||
/*member: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/
|
||||
testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
|
||||
|
||||
/*member: topLevelFieldGeneric3:
|
||||
/*spec:nnbd-off.member: topLevelFieldGeneric3:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -792,6 +1342,60 @@ testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:GenericClass<int,String>]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: topLevelFieldGeneric3:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSNull,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:GenericClass<int*,String*>*]
|
||||
*/
|
||||
GenericClass<int, String> topLevelFieldGeneric3;
|
||||
|
||||
/*member: testTopLevelFieldGeneric3:static=[topLevelFieldGeneric3]*/
|
||||
|
@ -916,7 +1520,7 @@ testLocalFunction() {
|
|||
localFunction() {}
|
||||
}
|
||||
|
||||
/*member: testLocalFunctionTyped:
|
||||
/*spec:nnbd-off.member: testLocalFunctionTyped:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -967,6 +1571,60 @@ testLocalFunction() {
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testLocalFunctionTyped:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
computeSignature(3),
|
||||
def:localFunction,
|
||||
findType(1),
|
||||
getRuntimeTypeArguments(3),
|
||||
getRuntimeTypeInfo(1),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:Function,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSNull,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:String*]
|
||||
*/
|
||||
testLocalFunctionTyped() {
|
||||
// ignore: UNUSED_ELEMENT
|
||||
int localFunction(String a) => null;
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef void Callback<T>(T value);
|
|||
/*member: GenericClass.:static=[JavaScriptObject.(0)]*/
|
||||
@JS()
|
||||
class GenericClass<T> {
|
||||
/*member: GenericClass.method:
|
||||
/*spec:nnbd-off.member: GenericClass.method:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -112,6 +112,60 @@ class GenericClass<T> {
|
|||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(GenericClass.T)]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: GenericClass.method:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSNull,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
param:void Function(GenericClass.T*)*]
|
||||
*/
|
||||
external GenericClass method([Callback<T> callback]);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'dart:html' show File;
|
|||
|
||||
import 'package:js/js.dart';
|
||||
|
||||
/*member: foo=:
|
||||
/*spec:nnbd-off.member: foo=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -61,10 +61,63 @@ import 'package:js/js.dart';
|
|||
native:SqlError,
|
||||
param:Function]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: foo=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
native:ApplicationCacheErrorEvent,
|
||||
native:DomError,
|
||||
native:DomException,
|
||||
native:ErrorEvent,
|
||||
native:MediaError,
|
||||
native:NavigatorUserMediaError,
|
||||
native:OverconstrainedError,
|
||||
native:PositionError,
|
||||
native:SensorErrorEvent,
|
||||
native:SpeechRecognitionError,
|
||||
native:SqlError,
|
||||
param:Function*]
|
||||
*/
|
||||
@JS()
|
||||
external set foo(Function f);
|
||||
|
||||
/*member: _doStuff:
|
||||
/*spec:nnbd-off.member: _doStuff:
|
||||
dynamic=[
|
||||
File.==,
|
||||
File.name],
|
||||
|
@ -111,6 +164,56 @@ external set foo(Function f);
|
|||
param:File,
|
||||
param:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: _doStuff:
|
||||
dynamic=[
|
||||
File.==,
|
||||
File.name],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
defineProperty(3),
|
||||
findType(1),
|
||||
instanceType(1),
|
||||
print(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:JSString,
|
||||
param:File*,
|
||||
param:String*]
|
||||
*/
|
||||
void _doStuff(String name, File file) {
|
||||
if (file == null) {
|
||||
print('OK');
|
||||
|
@ -118,12 +221,16 @@ void _doStuff(String name, File file) {
|
|||
print(file.name);
|
||||
}
|
||||
|
||||
/*member: main:
|
||||
/*spec:nnbd-off.member: main:
|
||||
static=[
|
||||
_doStuff,
|
||||
allowInterop<Function>(1),
|
||||
set:foo]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: main:static=[
|
||||
_doStuff,
|
||||
allowInterop<Function*>(1),
|
||||
set:foo]*/
|
||||
void main() {
|
||||
foo = allowInterop(_doStuff);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'dart:html' show File;
|
|||
|
||||
import 'package:js/js.dart';
|
||||
|
||||
/*member: foo=:
|
||||
/*spec:nnbd-off.member: foo=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -73,10 +73,75 @@ import 'package:js/js.dart';
|
|||
native:SqlError,
|
||||
param:void Function(String,File)]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: foo=:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkSubtype(4),
|
||||
findType(1),
|
||||
getRuntimeTypeArgument(3),
|
||||
getRuntimeTypeArgumentIntercepted(4),
|
||||
getRuntimeTypeInfo(1),
|
||||
getTypeArgumentByIndex(2),
|
||||
instanceType(1),
|
||||
setRuntimeTypeInfo(2)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSArray<dynamic>,
|
||||
inst:JSBool,
|
||||
inst:JSExtendableArray<dynamic>,
|
||||
inst:JSFixedArray<dynamic>,
|
||||
inst:JSMutableArray<dynamic>,
|
||||
inst:JSUnmodifiableArray<dynamic>,
|
||||
native:ApplicationCacheErrorEvent,
|
||||
native:DomError,
|
||||
native:DomException,
|
||||
native:ErrorEvent,
|
||||
native:File,
|
||||
native:MediaError,
|
||||
native:NavigatorUserMediaError,
|
||||
native:OverconstrainedError,
|
||||
native:PositionError,
|
||||
native:SensorErrorEvent,
|
||||
native:SpeechRecognitionError,
|
||||
native:SqlError,
|
||||
param:void Function(String*,File*)*]
|
||||
*/
|
||||
@JS()
|
||||
external set foo(void Function(String, File) f);
|
||||
|
||||
/*member: _doStuff:
|
||||
/*spec:nnbd-off.member: _doStuff:
|
||||
dynamic=[
|
||||
File.==,
|
||||
File.name],
|
||||
|
@ -123,6 +188,56 @@ external set foo(void Function(String, File) f);
|
|||
param:File,
|
||||
param:String]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: _doStuff:
|
||||
dynamic=[
|
||||
File.==,
|
||||
File.name],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
defineProperty(3),
|
||||
findType(1),
|
||||
instanceType(1),
|
||||
print(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:JSString,
|
||||
param:File*,
|
||||
param:String*]
|
||||
*/
|
||||
void _doStuff(String name, File file) {
|
||||
if (file == null) {
|
||||
print('OK');
|
||||
|
@ -130,12 +245,16 @@ void _doStuff(String name, File file) {
|
|||
print(file.name);
|
||||
}
|
||||
|
||||
/*member: main:
|
||||
/*spec:nnbd-off.member: main:
|
||||
static=[
|
||||
_doStuff,
|
||||
allowInterop<void Function(String,File)>(1),
|
||||
set:foo]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: main:static=[
|
||||
_doStuff,
|
||||
allowInterop<void Function(String*,File*)*>(1),
|
||||
set:foo]*/
|
||||
void main() {
|
||||
foo = allowInterop(_doStuff);
|
||||
}
|
||||
|
|
|
@ -131,7 +131,16 @@ testComplexConstSymbol() => const Symbol(complexSymbolField);
|
|||
/*member: testIfNullConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
|
||||
testIfNullConstSymbol() => const Symbol(null ?? 'foo');
|
||||
|
||||
/*member: testTypeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:Object]*/
|
||||
/*spec:nnbd-off.member: testTypeLiteral:static=[createRuntimeType(1),typeLiteral(1)],type=[inst:Type,inst:_Type,lit:Object]*/
|
||||
/*spec:nnbd-sdk.member: testTypeLiteral:
|
||||
static=[
|
||||
createRuntimeType(1),
|
||||
typeLiteral(1)],
|
||||
type=[
|
||||
inst:Type,
|
||||
inst:_Type,
|
||||
lit:Object*]
|
||||
*/
|
||||
testTypeLiteral() => Object;
|
||||
|
||||
/*member: testBoolFromEnvironment:type=[inst:JSBool]*/
|
||||
|
@ -143,13 +152,17 @@ testEmptyListLiteral() => [];
|
|||
/*member: testEmptyListLiteralDynamic:type=[inst:List<dynamic>]*/
|
||||
testEmptyListLiteralDynamic() => <dynamic>[];
|
||||
|
||||
/*member: testEmptyListLiteralTyped:type=[inst:List<String>]*/
|
||||
/*spec:nnbd-off.member: testEmptyListLiteralTyped:type=[inst:List<String>]*/
|
||||
/*spec:nnbd-sdk.member: testEmptyListLiteralTyped:type=[inst:List<String*>]*/
|
||||
testEmptyListLiteralTyped() => <String>[];
|
||||
|
||||
/*member: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
|
||||
testEmptyListLiteralConstant() => const [];
|
||||
|
||||
/*member: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-off.member: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
|
||||
/*spec:nnbd-sdk.member: testNonEmptyListLiteral:type=[
|
||||
inst:JSBool,
|
||||
inst:List<bool*>]*/
|
||||
testNonEmptyListLiteral() => [true];
|
||||
|
||||
/*member: testEmptyMapLiteral:type=[inst:Map<dynamic,dynamic>]*/
|
||||
|
@ -158,7 +171,8 @@ testEmptyMapLiteral() => {};
|
|||
/*member: testEmptyMapLiteralDynamic:type=[inst:Map<dynamic,dynamic>]*/
|
||||
testEmptyMapLiteralDynamic() => <dynamic, dynamic>{};
|
||||
|
||||
/*member: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
|
||||
/*spec:nnbd-off.member: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
|
||||
/*spec:nnbd-sdk.member: testEmptyMapLiteralTyped:type=[inst:Map<String*,int*>]*/
|
||||
testEmptyMapLiteralTyped() => <String, int>{};
|
||||
|
||||
/*member: testEmptyMapLiteralConstant:
|
||||
|
@ -170,7 +184,11 @@ type=[
|
|||
*/
|
||||
testEmptyMapLiteralConstant() => const {};
|
||||
|
||||
/*member: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
|
||||
/*spec:nnbd-off.member: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
|
||||
/*spec:nnbd-sdk.member: testNonEmptyMapLiteral:type=[
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:Map<Null,bool*>]*/
|
||||
testNonEmptyMapLiteral() => {null: true};
|
||||
|
||||
class GenericClass<X, Y> {
|
||||
|
|
|
@ -47,18 +47,18 @@ testNativeMethod() native;
|
|||
testNativeMethodCreates() native;
|
||||
|
||||
// This will trigger native instantiation and therefore include type use
|
||||
// `native:X` for all native types. This is truncated to `type=[*]` to avoid
|
||||
// `native:X` for all native types. This is truncated to `type=[%]` to avoid
|
||||
// dependency on the particular types. If `testNativeMethodReturns` was not
|
||||
// called `testNativeMethodCreates` would instead trigger the native
|
||||
// instantiations, so the blame is a bit arbitrary.
|
||||
/*member: testNativeMethodReturns:type=[*]*/
|
||||
/*member: testNativeMethodReturns:type=[%]*/
|
||||
@Returns('String|Null|JSArray')
|
||||
// ignore: NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE
|
||||
testNativeMethodReturns() native;
|
||||
|
||||
@Native("NativeClass")
|
||||
class NativeClass {
|
||||
/*member: NativeClass.field:
|
||||
/*spec:nnbd-off.member: NativeClass.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -104,6 +104,55 @@ class NativeClass {
|
|||
native:int,
|
||||
param:Object]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: NativeClass.field:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
native:JSExtendableArray<JSExtendableArray.E>,
|
||||
native:Object,
|
||||
native:String,
|
||||
native:bool,
|
||||
native:double,
|
||||
native:int,
|
||||
param:Object*]
|
||||
*/
|
||||
@annotation_Creates_SerializedScriptValue
|
||||
final Object field;
|
||||
|
||||
|
@ -112,7 +161,7 @@ class NativeClass {
|
|||
}
|
||||
}
|
||||
|
||||
/*member: testNativeField:
|
||||
/*spec:nnbd-off.member: testNativeField:
|
||||
dynamic=[NativeClass.field],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -153,4 +202,48 @@ class NativeClass {
|
|||
inst:JSBool,
|
||||
param:NativeClass]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testNativeField:
|
||||
dynamic=[NativeClass.field],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
defineProperty(3),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
param:NativeClass*]
|
||||
*/
|
||||
testNativeField(NativeClass c) => c.field;
|
||||
|
|
|
@ -39,7 +39,7 @@ main() {
|
|||
dynamicToNoSuchMethodTearOff(null);
|
||||
}
|
||||
|
||||
/*member: positiveTyped:
|
||||
/*spec:nnbd-off.member: positiveTyped:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -80,11 +80,55 @@ main() {
|
|||
is:SubClass,
|
||||
param:Class]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: positiveTyped:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
is:SubClass*,
|
||||
param:Class*]
|
||||
*/
|
||||
positiveTyped(Class cls) {
|
||||
if (cls is SubClass) cls.method();
|
||||
}
|
||||
|
||||
/*member: positiveDynamic:
|
||||
/*spec:nnbd-off.member: positiveDynamic:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -124,11 +168,54 @@ positiveTyped(Class cls) {
|
|||
inst:JSBool,
|
||||
is:SubClass]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: positiveDynamic:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
is:SubClass*]
|
||||
*/
|
||||
positiveDynamic(dynamic cls) {
|
||||
if (cls is SubClass) cls.method();
|
||||
}
|
||||
|
||||
/*member: negativeDynamic:
|
||||
/*spec:nnbd-off.member: negativeDynamic:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
|
@ -168,6 +255,49 @@ positiveDynamic(dynamic cls) {
|
|||
inst:JSBool,
|
||||
is:SubClass]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: negativeDynamic:
|
||||
dynamic=[SubClass.method(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
is:SubClass*]
|
||||
*/
|
||||
negativeDynamic(dynamic cls) {
|
||||
if (cls is! SubClass) return;
|
||||
cls.method();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -67,7 +67,7 @@ testIfThenElse() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*member: testForIn:
|
||||
/*spec:nnbd-off.member: testForIn:
|
||||
dynamic=[
|
||||
Iterator.current,
|
||||
Iterator.iterator,
|
||||
|
@ -113,12 +113,61 @@ testIfThenElse() {
|
|||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testForIn:
|
||||
dynamic=[
|
||||
Iterator.current,
|
||||
Iterator.iterator,
|
||||
Iterator.moveNext(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkConcurrentModificationError(2),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
impl:Iterable<dynamic>*,
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
testForIn(o) {
|
||||
// ignore: UNUSED_LOCAL_VARIABLE
|
||||
for (var e in o) {}
|
||||
}
|
||||
|
||||
/*member: testForInTyped:
|
||||
/*spec:nnbd-off.member: testForInTyped:
|
||||
dynamic=[
|
||||
Iterator.current,
|
||||
Iterator.iterator,
|
||||
|
@ -165,6 +214,56 @@ testForIn(o) {
|
|||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testForInTyped:
|
||||
dynamic=[
|
||||
Iterator.current,
|
||||
Iterator.iterator,
|
||||
Iterator.moveNext(0)],
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
checkConcurrentModificationError(2),
|
||||
findType(1),
|
||||
instanceType(1)],
|
||||
type=[
|
||||
impl:Iterable<dynamic>*,
|
||||
impl:int*,
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:JSNull,
|
||||
inst:Null]
|
||||
*/
|
||||
testForInTyped(o) {
|
||||
// ignore: UNUSED_LOCAL_VARIABLE
|
||||
for (int e in o) {}
|
||||
|
@ -180,7 +279,7 @@ testTryCatch() {
|
|||
try {} catch (e) {}
|
||||
}
|
||||
|
||||
/*member: testTryCatchOn:
|
||||
/*spec:nnbd-off.member: testTryCatchOn:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
|
@ -222,6 +321,51 @@ testTryCatch() {
|
|||
inst:PlainJavaScriptObject,
|
||||
inst:UnknownJavaScriptObject]
|
||||
*/
|
||||
/*spec:nnbd-sdk.member: testTryCatchOn:
|
||||
static=[
|
||||
Rti._bind(1),
|
||||
Rti._eval(1),
|
||||
_arrayInstanceType(1),
|
||||
_asBool(1),
|
||||
_asBoolQ(1),
|
||||
_asBoolS(1),
|
||||
_asDouble(1),
|
||||
_asDoubleQ(1),
|
||||
_asDoubleS(1),
|
||||
_asInt(1),
|
||||
_asIntQ(1),
|
||||
_asIntS(1),
|
||||
_asNum(1),
|
||||
_asNumQ(1),
|
||||
_asNumS(1),
|
||||
_asObject(1),
|
||||
_asString(1),
|
||||
_asStringQ(1),
|
||||
_asStringS(1),
|
||||
_asTop(1),
|
||||
_generalAsCheckImplementation(1),
|
||||
_generalIsTestImplementation(1),
|
||||
_generalNullableAsCheckImplementation(1),
|
||||
_generalNullableIsTestImplementation(1),
|
||||
_installSpecializedAsCheck(1),
|
||||
_installSpecializedIsTest(1),
|
||||
_instanceType(1),
|
||||
_isBool(1),
|
||||
_isInt(1),
|
||||
_isNum(1),
|
||||
_isObject(1),
|
||||
_isString(1),
|
||||
_isTop(1),
|
||||
findType(1),
|
||||
instanceType(1),
|
||||
unwrapException(1)],
|
||||
type=[
|
||||
catch:String*,
|
||||
inst:Closure,
|
||||
inst:JSBool,
|
||||
inst:PlainJavaScriptObject,
|
||||
inst:UnknownJavaScriptObject]
|
||||
*/
|
||||
testTryCatchOn() {
|
||||
// ignore: UNUSED_CATCH_CLAUSE
|
||||
try {} on String catch (e) {}
|
||||
|
|
|
@ -46,6 +46,8 @@ class Tags {
|
|||
class ImpactDataComputer extends DataComputer<Features> {
|
||||
const ImpactDataComputer();
|
||||
|
||||
static const String wildcard = '%';
|
||||
|
||||
@override
|
||||
void computeMemberData(Compiler compiler, MemberEntity member,
|
||||
Map<Id, ActualData<Features>> actualMap,
|
||||
|
@ -55,14 +57,14 @@ class ImpactDataComputer extends DataComputer<Features> {
|
|||
ir.Member node = frontendStrategy.elementMap.getMemberNode(member);
|
||||
Features features = new Features();
|
||||
if (impact.typeUses.length > 50) {
|
||||
features.addElement(Tags.typeUse, '*');
|
||||
features.addElement(Tags.typeUse, wildcard);
|
||||
} else {
|
||||
for (TypeUse use in impact.typeUses) {
|
||||
features.addElement(Tags.typeUse, use.shortText);
|
||||
}
|
||||
}
|
||||
if (impact.staticUses.length > 50) {
|
||||
features.addElement(Tags.staticUse, '*');
|
||||
features.addElement(Tags.staticUse, wildcard);
|
||||
} else {
|
||||
for (StaticUse use in impact.staticUses) {
|
||||
features.addElement(Tags.staticUse, use.shortText);
|
||||
|
@ -92,5 +94,5 @@ class ImpactDataComputer extends DataComputer<Features> {
|
|||
|
||||
@override
|
||||
DataInterpreter<Features> get dataValidator =>
|
||||
const FeaturesDataInterpreter(wildcard: '*');
|
||||
const FeaturesDataInterpreter(wildcard: wildcard);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue