#466. Subtyping tests for NNBD added.
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t01.dart
new file mode 100644
index 0000000..b9fdaf3
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t01.dart
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingGen<X> {
+ ArgumentsBindingGen(X t1) {}
+
+ ArgumentsBindingGen.named(X t1, {X t2}) {}
+ ArgumentsBindingGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+main() {
+ // test functions
+ namedArgumentsFunc1(forgetType(t0Instance), t2: forgetType(t0Instance));
+ positionalArgumentsFunc1(forgetType(t0Instance), forgetType(t0Instance));
+
+ // test class constructors
+ ArgumentsBindingClass instance1 =
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.fNamed(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.fPositional(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.named(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.positional(forgetType(t0Instance),
+ forgetType(t0Instance));
+
+ // tests methods and setters
+ instance1.namedArgumentsMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1.positionalArgumentsMethod(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance1.testSetter = forgetType(t0Instance);
+
+ // test static methods
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance), forgetType(t0Instance));
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic functions
+ namedArgumentsFunc2<Object>(forgetType(t0Instance), t2: forgetType(t0Instance));
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance), forgetType(t0Instance));
+
+ // test generic class constructors
+ ArgumentsBindingGen<Object> instance2 =
+ new ArgumentsBindingGen<Object>(forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.fNamed(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.fPositional(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.named(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.positional(forgetType(t0Instance),
+ forgetType(t0Instance));
+
+ // test generic class methods and setters
+ instance2.namedArgumentsMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2.positionalArgumentsMethod(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance2.testSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t02.dart
new file mode 100644
index 0000000..580bfb8
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t02.dart
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(X t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(X t1, X t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+
+ c1.test(forgetType(t0Instance), t1Instance);
+ c1.superTest(forgetType(t0Instance));
+ c1.superTestPositioned(forgetType(t0Instance));
+ c1.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c1.superTestNamed(forgetType(t0Instance));
+ c1.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c1.superSetter = forgetType(t0Instance);
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t02<Object> c2 =
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+
+ c2.test(forgetType(t0Instance), t1Instance);
+ c2.superTest(forgetType(t0Instance));
+ c2.superTestPositioned(forgetType(t0Instance));
+ c2.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c2.superTestNamed(forgetType(t0Instance));
+ c2.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c2.superSetter = forgetType(t0Instance);
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t03.dart
new file mode 100644
index 0000000..07fd28b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A04_t03.dart
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingMixin1_t03 {
+ Object m;
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingMixin2_t03<X> {
+ X m;
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingMixin2_t03<X> {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03();
+
+ c1.test(forgetType(t0Instance), t1Instance);
+ c1.superTest(forgetType(t0Instance));
+ c1.superTestPositioned(forgetType(t0Instance));
+ c1.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c1.superTestNamed(forgetType(t0Instance));
+ c1.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c1.superSetter = forgetType(t0Instance);
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t03<Object> c2 = new ArgumentsBinding2_t03<Object>();
+ c2.test(forgetType(t0Instance), t1Instance);
+ c2.superTest(forgetType(t0Instance));
+ c2.superTestPositioned(forgetType(t0Instance));
+ c2.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c2.superTestNamed(forgetType(t0Instance));
+ c2.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c2.superSetter = forgetType(t0Instance);
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t01.dart
new file mode 100644
index 0000000..d3ad595
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t01.dart
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingGen<X> {
+ ArgumentsBindingGen(X t1) {}
+
+ ArgumentsBindingGen.named(X t1, {X t2}) {}
+ ArgumentsBindingGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+main() {
+ // test functions
+ namedArgumentsFunc1(forgetType(t0Instance), t2: forgetType(t0Instance));
+ positionalArgumentsFunc1(forgetType(t0Instance), forgetType(t0Instance));
+
+ // test class constructors
+ ArgumentsBindingClass instance1 =
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.fNamed(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.fPositional(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.named(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1 = new ArgumentsBindingClass.positional(forgetType(t0Instance),
+ forgetType(t0Instance));
+
+ // tests methods and setters
+ instance1.namedArgumentsMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance1.positionalArgumentsMethod(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance1.testSetter = forgetType(t0Instance);
+
+ // test static methods
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance), forgetType(t0Instance));
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic functions
+ namedArgumentsFunc2<Object>(forgetType(t0Instance), t2: forgetType(t0Instance));
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance), forgetType(t0Instance));
+
+ // test generic class constructors
+ ArgumentsBindingGen<Object> instance2 =
+ new ArgumentsBindingGen<Object>(forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.fNamed(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.fPositional(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.named(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2 = new ArgumentsBindingGen<Object>.positional(forgetType(t0Instance),
+ forgetType(t0Instance));
+
+ // test generic class methods and setters
+ instance2.namedArgumentsMethod(forgetType(t0Instance),
+ t2: forgetType(t0Instance));
+ instance2.positionalArgumentsMethod(forgetType(t0Instance),
+ forgetType(t0Instance));
+ instance2.testSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t02.dart
new file mode 100644
index 0000000..35c2e32
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t02.dart
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(X t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(X t1, X t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ c1 = new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+
+ c1.test(forgetType(t0Instance), t1Instance);
+ c1.superTest(forgetType(t0Instance));
+ c1.superTestPositioned(forgetType(t0Instance));
+ c1.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c1.superTestNamed(forgetType(t0Instance));
+ c1.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c1.superSetter = forgetType(t0Instance);
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t02<Object> c2 =
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ c2 = new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+
+ c2.test(forgetType(t0Instance), t1Instance);
+ c2.superTest(forgetType(t0Instance));
+ c2.superTestPositioned(forgetType(t0Instance));
+ c2.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c2.superTestNamed(forgetType(t0Instance));
+ c2.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c2.superSetter = forgetType(t0Instance);
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t03.dart
new file mode 100644
index 0000000..fd617b7
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_arguments_binding_A05_t03.dart
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingMixin1_t03 {
+ Object m;
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingMixin2_t03<X> {
+ X m;
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingMixin2_t03<X> {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03();
+
+ c1.test(forgetType(t0Instance), t1Instance);
+ c1.superTest(forgetType(t0Instance));
+ c1.superTestPositioned(forgetType(t0Instance));
+ c1.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c1.superTestNamed(forgetType(t0Instance));
+ c1.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c1.superSetter = forgetType(t0Instance);
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t03<Object> c2 = new ArgumentsBinding2_t03<Object>();
+ c2.test(forgetType(t0Instance), t1Instance);
+ c2.superTest(forgetType(t0Instance));
+ c2.superTestPositioned(forgetType(t0Instance));
+ c2.superTestPositioned(t1Instance, forgetType(t0Instance));
+ c2.superTestNamed(forgetType(t0Instance));
+ c2.superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ c2.superSetter = forgetType(t0Instance);
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t01.dart
new file mode 100644
index 0000000..aabda8f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t01.dart
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMember1_t01 {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+ Object _p = forgetType(t0Instance);
+
+ ClassMember1_t01() {
+ s = forgetType(t0Instance);
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ ClassMember1_t01.named(Object value) {
+ s = value;
+ m = value;
+ _p = value;
+ }
+
+ ClassMember1_t01.short(this.m, this._p);
+
+ test() {
+ s = forgetType(t0Instance);
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ set setter(Object val) {
+ _p = val;
+ }
+
+ Object get getter => forgetType(_p);
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(Object val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMember2_t01<X> {
+ X m;
+ X _p;
+
+ ClassMember2_t01() {
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ ClassMember2_t01.named(X value) {
+ m = value;
+ _p = value;
+ }
+
+ ClassMember2_t01.short(this.m, this._p);
+
+ test(X v) {
+ m = v;
+ _p = v;
+ }
+
+ set setter(X val) {
+ _p = val;
+ }
+
+ Object get getter => forgetType(_p);
+}
+
+main() {
+ ClassMember1_t01 c1 = new ClassMember1_t01();
+ c1 = new ClassMember1_t01.short(forgetType(t0Instance),
+ forgetType(t0Instance));
+ c1 = new ClassMember1_t01.named(forgetType(t0Instance));
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.setter = forgetType(t0Instance);
+ c1.getter;
+
+ ClassMember1_t01.s = forgetType(t0Instance);
+ ClassMember1_t01.staticTest();
+ ClassMember1_t01.staticSetter = forgetType(t0Instance);
+ ClassMember1_t01.staticGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t01<Object> c2 = new ClassMember2_t01<Object>();
+ c2 = new ClassMember2_t01<Object>.short(forgetType(t0Instance),
+ forgetType(t0Instance));
+ c2 = new ClassMember2_t01<Object>.named(forgetType(t0Instance));
+ c2.m = forgetType(t0Instance);
+ c2.test(forgetType(t0Instance));
+ c2.getter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t02.dart
new file mode 100644
index 0000000..c088cfe
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t02.dart
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ ClassMember1_t02 c1 = new ClassMember1_t02();
+ c1 = new ClassMember1_t02.short();
+ c1 = new ClassMember1_t02.named();
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.superSetter = forgetType(t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t02<Object> c2 = new ClassMember2_t02<Object>();
+ c2 = new ClassMember2_t02<Object>.short();
+ c2 = new ClassMember2_t02<Object>.named();
+ c2.m = forgetType(t0Instance);
+ c2.test();
+ c2.superSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t03.dart
new file mode 100644
index 0000000..7d6a50f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A04_t03.dart
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberMixin1_t03 {
+ Object m;
+
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 {
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberMixin2_t03<X> {
+ X m;
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember2_t03<X> extends Object with ClassMemberMixin2_t03<X> {
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ ClassMember1_t03 c1 = new ClassMember1_t03();
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.superSetter = forgetType(t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t03<Object> c2 = new ClassMember2_t03<Object>();
+ c2.m = forgetType(t0Instance);
+ c2.test();
+ c2.superSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t01.dart
new file mode 100644
index 0000000..9d847f1
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t01.dart
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMember1_t01 {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+ Object _p = forgetType(t0Instance);
+
+ ClassMember1_t01() {
+ s = forgetType(t0Instance);
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ ClassMember1_t01.named(Object value) {
+ s = value;
+ m = value;
+ _p = value;
+ }
+
+ ClassMember1_t01.short(this.m, this._p);
+
+ test() {
+ s = forgetType(t0Instance);
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ set setter(Object val) {
+ _p = val;
+ }
+
+ Object get getter => forgetType(_p);
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(Object val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMember2_t01<X> {
+ X m;
+ X _p;
+
+ ClassMember2_t01() {
+ m = forgetType(t0Instance);
+ _p = forgetType(t0Instance);
+ }
+
+ ClassMember2_t01.named(X value) {
+ m = value;
+ _p = value;
+ }
+
+ ClassMember2_t01.short(this.m, this._p);
+
+ test(X v) {
+ m = v;
+ _p = v;
+ }
+
+ set setter(X val) {
+ _p = val;
+ }
+
+ Object get getter => forgetType(_p);
+}
+
+main() {
+ ClassMember1_t01 c1 = new ClassMember1_t01();
+ c1 = new ClassMember1_t01.short(forgetType(t0Instance),
+ forgetType(t0Instance));
+ c1 = new ClassMember1_t01.named(forgetType(t0Instance));
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.setter = forgetType(t0Instance);
+ c1.getter;
+
+ ClassMember1_t01.s = forgetType(t0Instance);
+ ClassMember1_t01.staticTest();
+ ClassMember1_t01.staticSetter = forgetType(t0Instance);
+ ClassMember1_t01.staticGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t01<Object> c2 = new ClassMember2_t01<Object>();
+ c2 = new ClassMember2_t01<Object>.short(forgetType(t0Instance),
+ forgetType(t0Instance));
+ c2 = new ClassMember2_t01<Object>.named(forgetType(t0Instance));
+ c2.m = forgetType(t0Instance);
+ c2.test(forgetType(t0Instance));
+ c2.getter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t02.dart
new file mode 100644
index 0000000..bfb0ae0
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t02.dart
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ ClassMember1_t02 c1 = new ClassMember1_t02();
+ c1 = new ClassMember1_t02.short();
+ c1 = new ClassMember1_t02.named();
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.superSetter = forgetType(t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t02<Object> c2 = new ClassMember2_t02<Object>();
+ c2 = new ClassMember2_t02<Object>.short();
+ c2 = new ClassMember2_t02<Object>.named();
+ c2.m = forgetType(t0Instance);
+ c2.test();
+ c2.superSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t03.dart
new file mode 100644
index 0000000..b10e96d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_class_member_A05_t03.dart
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberMixin1_t03 {
+ Object m;
+
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 {
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberMixin2_t03<X> {
+ X m;
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember2_t03<X> extends Object with ClassMemberMixin2_t03<X> {
+ test() {
+ m = forgetType(t0Instance);
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ ClassMember1_t03 c1 = new ClassMember1_t03();
+ c1.m = forgetType(t0Instance);
+ c1.test();
+ c1.superSetter = forgetType(t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ClassMember2_t03<Object> c2 = new ClassMember2_t03<Object>();
+ c2.m = forgetType(t0Instance);
+ c2.test();
+ c2.superSetter = forgetType(t0Instance);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t01.dart
new file mode 100644
index 0000000..24981f9
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t01.dart
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassGen<X> {
+ ArgumentsBindingClassGen(X t1) {}
+
+ ArgumentsBindingClassGen.named(X t1, {X t2}) {}
+ ArgumentsBindingClassGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingClassGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingClassGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClassGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingClassGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+class ArgumentsBindingClassSuper {
+ ArgumentsBindingClassSuper(Object t1) {}
+}
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper {
+ ArgumentsBindingDesc(FutureOr<S?> t0) : super (forgetType(t0)) {}
+}
+
+main() {
+ // Test functions
+ Expect.throws(() {
+ namedArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc1(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test static methods
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test generic functions
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ //# -->
+
+ // Test superclass constructor call
+ Expect.throws(() {
+ new ArgumentsBindingDesc(t0Instance);
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t02.dart
new file mode 100644
index 0000000..47cd833
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t02.dart
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding2_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test constructors
+ Expect.throws(() {
+ new ArgumentsBinding1_t02(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t02.valid().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class constructors
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t02<Object>.valid().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t03.dart
new file mode 100644
index 0000000..bd60713
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A03_t03.dart
@@ -0,0 +1,312 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t03<X> {
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingSuper2_t03<X> {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t03().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t03<Object>().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t01.dart
new file mode 100644
index 0000000..327850d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t01.dart
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassGen<X> {
+ ArgumentsBindingClassGen(X t1) {}
+
+ ArgumentsBindingClassGen.named(X t1, {X t2}) {}
+ ArgumentsBindingClassGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingClassGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingClassGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClassGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingClassGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+class ArgumentsBindingClassSuper {
+ ArgumentsBindingClassSuper(Object t1) {}
+}
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper {
+ ArgumentsBindingDesc(FutureOr<S?> t0) : super (forgetType(t0)) {}
+}
+
+main() {
+ // Test functions
+ Expect.throws(() {
+ namedArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc1(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test static methods
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test generic functions
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ //# -->
+
+ // Test superclass constructor call
+ Expect.throws(() {
+ new ArgumentsBindingDesc(t0Instance);
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t02.dart
new file mode 100644
index 0000000..f6faabc
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t02.dart
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding2_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test constructors
+ Expect.throws(() {
+ new ArgumentsBinding1_t02(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t02.valid().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class constructors
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t02<Object>.valid().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t03.dart
new file mode 100644
index 0000000..b0ada15
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A04_t03.dart
@@ -0,0 +1,312 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t03<X> {
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingSuper2_t03<X> {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t03().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t03<Object>().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t01.dart
new file mode 100644
index 0000000..24dd2be
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t01.dart
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassGen<X> {
+ ArgumentsBindingClassGen(X t1) {}
+
+ ArgumentsBindingClassGen.named(X t1, {X t2}) {}
+ ArgumentsBindingClassGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingClassGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingClassGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClassGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingClassGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+class ArgumentsBindingClassSuper {
+ ArgumentsBindingClassSuper(Object t1) {}
+}
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper {
+ ArgumentsBindingDesc(FutureOr<X> t0) : super (forgetType(t0)) {}
+}
+
+main() {
+ // Test functions
+ Expect.throws(() {
+ namedArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc1(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test static methods
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test generic functions
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ //# -->
+
+ // Test superclass constructor call
+ Expect.throws(() {
+ new ArgumentsBindingDesc(t0Instance);
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t02.dart
new file mode 100644
index 0000000..e5991dd
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t02.dart
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding2_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test constructors
+ Expect.throws(() {
+ new ArgumentsBinding1_t02(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t02.valid().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class constructors
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t02<Object>.valid().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t03.dart
new file mode 100644
index 0000000..5f8c0bd
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A05_t03.dart
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t03<X> {
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingSuper2_t03<X> {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t03().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t03<Object>().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t01.dart
new file mode 100644
index 0000000..b8ef422
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t01.dart
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassGen<X> {
+ ArgumentsBindingClassGen(X t1) {}
+
+ ArgumentsBindingClassGen.named(X t1, {X t2}) {}
+ ArgumentsBindingClassGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingClassGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingClassGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClassGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingClassGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+class ArgumentsBindingClassSuper {
+ ArgumentsBindingClassSuper(Object t1) {}
+}
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper {
+ ArgumentsBindingDesc(FutureOr<X> t0) : super (forgetType(t0)) {}
+}
+
+main() {
+ // Test functions
+ Expect.throws(() {
+ namedArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc1(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc1(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClass(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClass(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test static methods
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test generic functions
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ namedArgumentsFunc2<Object>(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ positionalArgumentsFunc2<Object>(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.named(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.positional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fNamed(t1Instance, t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>.fPositional(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+
+ // Test instance methods and setters
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).namedArgumentsMethod(t1Instance,
+ t2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).positionalArgumentsMethod(t1Instance,
+ forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBindingClassGen<Object>(t1Instance).testSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ //# -->
+
+ // Test superclass constructor call
+ Expect.throws(() {
+ new ArgumentsBindingDesc(t0Instance);
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t02.dart
new file mode 100644
index 0000000..045c05a
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t02.dart
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ ArgumentsBinding2_t02.valid() : super(null) {}
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test constructors
+ Expect.throws(() {
+ new ArgumentsBinding1_t02(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t02.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t02.valid().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class constructors
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c1(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c2(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c3(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c4(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.c5(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t02<Object>.valid().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t02<Object>.valid().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t03.dart
new file mode 100644
index 0000000..85002ea
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_arguments_binding_fail_A06_t03.dart
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => forgetType(t0Instance);
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+class ArgumentsBindingSuper2_t03<X> {
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => forgetType(t0Instance);
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingSuper2_t03<X> {
+
+ test() {
+ Expect.throws(() {
+ superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ this.superGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ super.superGetter;
+ }, (e) => e is TypeError);
+ }
+}
+
+main() {
+ // test class members
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding1_t03().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding1_t03().test();
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic class members
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTest(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestPositioned(forgetType(t1Instance), forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ArgumentsBinding2_t03<Object>().superGetter;
+ }, (e) => e is TypeError);
+
+ new ArgumentsBinding2_t03<Object>().test();
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t01.dart
new file mode 100644
index 0000000..73c0e2f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t01.dart
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(dynamic val) {
+ s = val;
+ }
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(dynamic val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ Object get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPublic<X> {
+ X m;
+
+ ClassMemberTestGenericPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestGenericPublic.short(this.m);
+
+ ClassMemberTestGenericPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ X get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPrivate<X> {
+ X _m;
+
+ ClassMemberTestGenericPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestGenericPrivate.short(this._m);
+
+ ClassMemberTestGenericPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+
+main() {
+
+ // Test initialization
+ Expect.throws(() {ClassMemberTestInitFail.s;}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMemberTestInitFail();}, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestPublic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPublic.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+
+ // Test static stuff
+ Expect.throws(() {
+ new ClassMemberTestStatic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticSetter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticTest();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t02.dart
new file mode 100644
index 0000000..74d9545
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t02.dart
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember1_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember2_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {new ClassMember1_t02();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ClassMember2_t02<Object>();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t03.dart
new file mode 100644
index 0000000..74253c0
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A03_t03.dart
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t03<X> {
+ X m;
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t03<X> extends ClassMemberSuper2_t03<X> {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {
+ new ClassMember1_t03().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t01.dart
new file mode 100644
index 0000000..8f751b7
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t01.dart
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(dynamic val) {
+ s = val;
+ }
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(dynamic val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ Object get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPublic<X> {
+ X m;
+
+ ClassMemberTestGenericPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestGenericPublic.short(this.m);
+
+ ClassMemberTestGenericPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ X get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPrivate<X> {
+ X _m;
+
+ ClassMemberTestGenericPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestGenericPrivate.short(this._m);
+
+ ClassMemberTestGenericPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+
+main() {
+
+ // Test initialization
+ Expect.throws(() {ClassMemberTestInitFail.s;}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMemberTestInitFail();}, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestPublic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPublic.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+
+ // Test static stuff
+ Expect.throws(() {
+ new ClassMemberTestStatic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticSetter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticTest();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t02.dart
new file mode 100644
index 0000000..81ab79a
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t02.dart
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember1_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember2_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {new ClassMember1_t02();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ClassMember2_t02<Object>();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t03.dart
new file mode 100644
index 0000000..5a8a43e
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A04_t03.dart
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t03<X> {
+ X m;
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t03<X> extends ClassMemberSuper2_t03<X> {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {
+ new ClassMember1_t03().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t01.dart
new file mode 100644
index 0000000..287e251
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t01.dart
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(dynamic val) {
+ s = val;
+ }
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(dynamic val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ Object get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPublic<X> {
+ X m;
+
+ ClassMemberTestGenericPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestGenericPublic.short(this.m);
+
+ ClassMemberTestGenericPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ X get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPrivate<X> {
+ X _m;
+
+ ClassMemberTestGenericPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestGenericPrivate.short(this._m);
+
+ ClassMemberTestGenericPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+
+main() {
+
+ // Test initialization
+ Expect.throws(() {ClassMemberTestInitFail.s;}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMemberTestInitFail();}, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestPublic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPublic.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+
+ // Test static stuff
+ Expect.throws(() {
+ new ClassMemberTestStatic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticSetter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticTest();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t02.dart
new file mode 100644
index 0000000..1a8b299
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t02.dart
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember1_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember2_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {new ClassMember1_t02();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ClassMember2_t02<Object>();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t03.dart
new file mode 100644
index 0000000..138c392
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A05_t03.dart
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t03<X> {
+ X m;
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t03<X> extends ClassMemberSuper2_t03<X> {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {
+ new ClassMember1_t03().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t01.dart
new file mode 100644
index 0000000..c98b705
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t01.dart
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(dynamic val) {
+ s = val;
+ }
+
+ static staticTest() {
+ s = forgetType(t0Instance);
+ }
+
+ static set staticSetter(dynamic val) {
+ s = val;
+ }
+
+ static Object get staticGetter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ Object get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = forgetType(t0Instance);
+ Object m = forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPublic<X> {
+ X m;
+
+ ClassMemberTestGenericPublic(dynamic val) {
+ m = val;
+ }
+
+ ClassMemberTestGenericPublic.short(this.m);
+
+ ClassMemberTestGenericPublic.validConstructor() {}
+
+ test(dynamic val) {
+ m = val;
+ }
+
+ set setter(dynamic val) {
+ m = val;
+ }
+
+ X get getter => forgetType(t0Instance);
+}
+
+class ClassMemberTestGenericPrivate<X> {
+ X _m;
+
+ ClassMemberTestGenericPrivate(dynamic val) {
+ _m = val;
+ }
+
+ ClassMemberTestGenericPrivate.short(this._m);
+
+ ClassMemberTestGenericPrivate.validConstructor() {}
+
+ test(dynamic val) {
+ _m = val;
+ }
+
+ set setter(dynamic val) {
+ _m = val;
+ }
+}
+
+
+main() {
+
+ // Test initialization
+ Expect.throws(() {ClassMemberTestInitFail.s;}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMemberTestInitFail();}, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestPublic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPublic.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestPublic.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+
+ // Test static stuff
+ Expect.throws(() {
+ new ClassMemberTestStatic(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticSetter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticGetter;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ ClassMemberTestStatic.staticTest();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // Test getters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().getter;
+ }, (e) => e is TypeError);
+
+ // Test methods
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().test(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test setters
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.validConstructor().setter = t0Instance;
+ }, (e) => e is TypeError);
+
+ // Test class variables
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.validConstructor().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ // Test constructors
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPublic<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new ClassMemberTestGenericPrivate<Object>.short(forgetType(t0Instance));
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t02.dart
new file mode 100644
index 0000000..90192b2
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t02.dart
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_fail_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember1_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember1_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t02<X> {
+ X m;
+
+ ClassMemberSuper2_t02(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.named(X value) {
+ m = value;
+ }
+
+ ClassMemberSuper2_t02.short(this.m);
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t02<X> extends ClassMemberSuper2_t02<X> {
+
+ ClassMember2_t02() : super(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {}
+
+ ClassMember2_t02.short() : super.short(forgetType(t0Instance));
+
+ ClassMember2_t02.valid() : super(null);
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {new ClassMember1_t02();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember1_t02.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t02.valid().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ClassMember2_t02<Object>();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.short();}, (e) => e is TypeError);
+ Expect.throws(() {new ClassMember2_t02<Object>.named();}, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t02<Object>.valid().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t03.dart
new file mode 100644
index 0000000..988f101
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_class_member_fail_A06_t03.dart
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_fail_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+class ClassMemberSuper2_t03<X> {
+ X m;
+
+ void set superSetter(X val) {}
+}
+
+class ClassMember2_t03<X> extends ClassMemberSuper2_t03<X> {
+
+ test1() {
+ m = forgetType(t0Instance);
+ }
+
+ test2() {
+ superSetter = forgetType(t0Instance);
+ }
+}
+
+main() {
+ Expect.throws(() {
+ new ClassMember1_t03().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember1_t03().test2();
+ }, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().m = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().superSetter = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test1();
+ }, (e) => e is TypeError);
+ Expect.throws(() {
+ new ClassMember2_t03<Object>().test2();
+ }, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A03_t01.dart
new file mode 100644
index 0000000..5b45ebd
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A03_t01.dart
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ t1Instance = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest.valid().foo();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ GlobalVariableTest.test();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A04_t01.dart
new file mode 100644
index 0000000..1642055
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A04_t01.dart
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ t1Instance = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest.valid().foo();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ GlobalVariableTest.test();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A05_t01.dart
new file mode 100644
index 0000000..d99e294
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A05_t01.dart
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ t1Instance = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest.valid().foo();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ GlobalVariableTest.test();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A06_t01.dart
new file mode 100644
index 0000000..885bdf6
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_global_variable_fail_A06_t01.dart
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ t1Instance = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new GlobalVariableTest.valid().foo();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ GlobalVariableTest.test();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A03_t01.dart
new file mode 100644
index 0000000..22380ce
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A03_t01.dart
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ LocalVariableTest.valid() {}
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest.valid().test();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ LocalVariableTest.staticTest();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A04_t01.dart
new file mode 100644
index 0000000..df16e9d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A04_t01.dart
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ LocalVariableTest.valid() {}
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest.valid().test();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ LocalVariableTest.staticTest();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A05_t01.dart
new file mode 100644
index 0000000..a2d515f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A05_t01.dart
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ LocalVariableTest.valid() {}
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest.valid().test();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ LocalVariableTest.staticTest();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A06_t01.dart
new file mode 100644
index 0000000..f199356
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_local_variable_fail_A06_t01.dart
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ LocalVariableTest.valid() {}
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }
+
+ Expect.throws(() {
+ Object t1 = null;
+ t1 = forgetType(t0Instance);
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ bar();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ new LocalVariableTest.valid().test();
+ }, (e) => e is TypeError);
+
+ Expect.throws(() {
+ LocalVariableTest.staticTest();
+ }, (e) => e is TypeError);
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A03_t01.dart
new file mode 100644
index 0000000..774435d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A03_t01.dart
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ Expect.throws(() {returnValueFunc();}, (e) => e is TypeError);
+ Expect.throws(() {returnValueLocalFunc();}, (e) => e is TypeError);
+ Expect.throws(() {ReturnValueTest.staticTestMethod();}, (e) => e is TypeError);
+
+ Expect.throws(() {new ReturnValueTest().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueTest().testGetter;}, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ReturnValueGen<Object>().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueGen<Object>().testGetter;}, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A04_t01.dart
new file mode 100644
index 0000000..555820d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A04_t01.dart
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ Expect.throws(() {returnValueFunc();}, (e) => e is TypeError);
+ Expect.throws(() {returnValueLocalFunc();}, (e) => e is TypeError);
+ Expect.throws(() {ReturnValueTest.staticTestMethod();}, (e) => e is TypeError);
+
+ Expect.throws(() {new ReturnValueTest().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueTest().testGetter;}, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ReturnValueGen<Object>().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueGen<Object>().testGetter;}, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A05_t01.dart
new file mode 100644
index 0000000..86e4acf
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A05_t01.dart
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ Expect.throws(() {returnValueFunc();}, (e) => e is TypeError);
+ Expect.throws(() {returnValueLocalFunc();}, (e) => e is TypeError);
+ Expect.throws(() {ReturnValueTest.staticTestMethod();}, (e) => e is TypeError);
+
+ Expect.throws(() {new ReturnValueTest().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueTest().testGetter;}, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ReturnValueGen<Object>().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueGen<Object>().testGetter;}, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A06_t01.dart
new file mode 100644
index 0000000..1a97601
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_fail_return_value_fail_A06_t01.dart
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+import '../../../../Utils/expect.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ Expect.throws(() {returnValueFunc();}, (e) => e is TypeError);
+ Expect.throws(() {returnValueLocalFunc();}, (e) => e is TypeError);
+ Expect.throws(() {ReturnValueTest.staticTestMethod();}, (e) => e is TypeError);
+
+ Expect.throws(() {new ReturnValueTest().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueTest().testGetter;}, (e) => e is TypeError);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ Expect.throws(() {new ReturnValueGen<Object>().testMethod();}, (e) => e is TypeError);
+ Expect.throws(() {new ReturnValueGen<Object>().testGetter;}, (e) => e is TypeError);
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A04_t01.dart
new file mode 100644
index 0000000..fec9728
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A04_t01.dart
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * global_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ t1Instance = forgetType(t0Instance);
+ bar();
+ GlobalVariableTest t = new GlobalVariableTest();
+ t.foo();
+ GlobalVariableTest.test();
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A05_t01.dart
new file mode 100644
index 0000000..bed045a
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_global_variable_A05_t01.dart
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * global_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ foo() {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ static test() {
+ t1Instance = forgetType(t0Instance);
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = forgetType(t0Instance);
+ }
+
+ t1Instance = forgetType(t0Instance);
+ bar();
+ GlobalVariableTest t = new GlobalVariableTest();
+ t.foo();
+ GlobalVariableTest.test();
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A04_t01.dart
new file mode 100644
index 0000000..caa2bfe
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A04_t01.dart
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * local_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ static staticTest() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ foo() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ foo();
+ LocalVariableTest x = new LocalVariableTest();
+ x.test();
+ LocalVariableTest.staticTest();
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A05_t01.dart
new file mode 100644
index 0000000..4600e83
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_local_variable_A05_t01.dart
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * local_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ static staticTest() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ test() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+}
+
+main() {
+ foo() {
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ }
+
+ Object t1 = forgetType(t0Instance);
+ t1 = forgetType(t0Instance);
+ foo();
+ LocalVariableTest x = new LocalVariableTest();
+ x.test();
+ LocalVariableTest.staticTest();
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A04_t01.dart
new file mode 100644
index 0000000..6533c2f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A04_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * return_value_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ returnValueFunc();
+ returnValueLocalFunc();
+
+ ReturnValueTest.staticTestMethod();
+
+ new ReturnValueTest().testMethod();
+ new ReturnValueTest().testGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ new ReturnValueGen<Object>().testMethod();
+ new ReturnValueGen<Object>().testGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A05_t01.dart
new file mode 100644
index 0000000..356b83b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/dynamic/generated/right_object_return_value_A05_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * return_value_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+import '../../utils/common.dart';
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => forgetType(t0Instance);
+
+class ReturnValueTest {
+ static Object staticTestMethod() => forgetType(t0Instance);
+
+ Object testMethod() => forgetType(t0Instance);
+
+ Object get testGetter => forgetType(t0Instance);
+}
+
+class ReturnValueGen<X> {
+ X testMethod() => forgetType(t0Instance);
+ X get testGetter => forgetType(t0Instance);
+}
+
+
+main() {
+ Object returnValueLocalFunc() => forgetType(t0Instance);
+
+ returnValueFunc();
+ returnValueLocalFunc();
+
+ ReturnValueTest.staticTestMethod();
+
+ new ReturnValueTest().testMethod();
+ new ReturnValueTest().testGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ new ReturnValueGen<Object>().testMethod();
+ new ReturnValueGen<Object>().testGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t01.dart
new file mode 100644
index 0000000..e95d3d5
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t01.dart
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingGen<X> {
+ ArgumentsBindingGen(X t1) {}
+
+ ArgumentsBindingGen.named(X t1, {X t2}) {}
+ ArgumentsBindingGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+main() {
+ // test functions
+ namedArgumentsFunc1(t0Instance, t2: t0Instance);
+ positionalArgumentsFunc1(t0Instance, t0Instance);
+
+ // test class constructors
+ ArgumentsBindingClass instance1 = new ArgumentsBindingClass(t0Instance);
+ instance1 = new ArgumentsBindingClass.fNamed(t0Instance, t2: t0Instance);
+ instance1 = new ArgumentsBindingClass.fPositional(t0Instance, t0Instance);
+ instance1 = new ArgumentsBindingClass.named(t0Instance, t2: t0Instance);
+ instance1 = new ArgumentsBindingClass.positional(t0Instance, t0Instance);
+
+ // tests methods and setters
+ instance1.namedArgumentsMethod(t0Instance, t2: t0Instance);
+ instance1.positionalArgumentsMethod(t0Instance, t0Instance);
+ instance1.testSetter = t0Instance;
+
+ // test static methods
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance, t2: t0Instance);
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance, t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic functions
+ namedArgumentsFunc2<Object>(t0Instance, t2: t0Instance);
+ positionalArgumentsFunc2<Object>(t0Instance, t0Instance);
+
+ // test generic class constructors
+ ArgumentsBindingGen<Object> instance2 = new ArgumentsBindingGen<Object>(t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.fNamed(t0Instance, t2: t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.fPositional(t0Instance, t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.named(t0Instance, t2: t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.positional(t0Instance, t0Instance);
+
+ // test generic class methods and setters
+ instance2.namedArgumentsMethod(t0Instance, t2: t0Instance);
+ instance2.positionalArgumentsMethod(t0Instance, t0Instance);
+ instance2.testSetter = t0Instance;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t02.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t02.dart
new file mode 100644
index 0000000..4e2166b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t02.dart
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(X t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(X t1, X t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c1(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c2(t1Instance, t0Instance);
+ c1 = new ArgumentsBinding1_t02.c3(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);
+ c1 = new ArgumentsBinding1_t02.c5(t0Instance);
+
+ c1.test(t0Instance, t1Instance);
+ c1.superTest(t0Instance);
+ c1.superTestPositioned(t0Instance);
+ c1.superTestPositioned(t1Instance, t0Instance);
+ c1.superTestNamed(t0Instance);
+ c1.superTestNamed(t1Instance, val2: t0Instance);
+ c1.superSetter = t0Instance;
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t02<Object> c2 =
+ new ArgumentsBinding2_t02<Object>(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c1(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c2(t1Instance, t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c3(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c4(t1Instance, t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c5(t0Instance);
+
+ c2.test(t0Instance, t1Instance);
+ c2.superTest(t0Instance);
+ c2.superTestPositioned(t0Instance);
+ c2.superTestPositioned(t1Instance, t0Instance);
+ c2.superTestNamed(t0Instance);
+ c2.superTestNamed(t1Instance, val2: t0Instance);
+ c2.superSetter = t0Instance;
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t03.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t03.dart
new file mode 100644
index 0000000..464bea7
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A04_t03.dart
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * arguments_binding_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingMixin1_t03 {
+ Object m;
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingMixin2_t03<X> {
+ X m;
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingMixin2_t03<X> {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03();
+
+ c1.test(t0Instance, t1Instance);
+ c1.superTest(t0Instance);
+ c1.superTestPositioned(t0Instance);
+ c1.superTestPositioned(t1Instance, t0Instance);
+ c1.superTestNamed(t0Instance);
+ c1.superTestNamed(t1Instance, val2: t0Instance);
+ c1.superSetter = t0Instance;
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t03<Object> c2 = new ArgumentsBinding2_t03<Object>();
+ c2.test(t0Instance, t1Instance);
+ c2.superTest(t0Instance);
+ c2.superTestPositioned(t0Instance);
+ c2.superTestPositioned(t1Instance, t0Instance);
+ c2.superTestNamed(t0Instance);
+ c2.superTestNamed(t1Instance, val2: t0Instance);
+ c2.superSetter = t0Instance;
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t01.dart
new file mode 100644
index 0000000..0afbb97
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t01.dart
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+namedArgumentsFunc2<X>(X t1, {X t2}) {}
+positionalArgumentsFunc2<X>(X t1, [X t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingGen<X> {
+ ArgumentsBindingGen(X t1) {}
+
+ ArgumentsBindingGen.named(X t1, {X t2}) {}
+ ArgumentsBindingGen.positional(X t1, [X t2]) {}
+
+ factory ArgumentsBindingGen.fNamed(X t1, {X t2}) {
+ return new ArgumentsBindingGen.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingGen.fPositional(X t1, [X t2]) {
+ return new ArgumentsBindingGen.positional(t1, t2);
+ }
+
+ namedArgumentsMethod(X t1, {X t2}) {}
+ positionalArgumentsMethod(X t1, [X t2]){}
+
+ set testSetter(X val) {}
+}
+
+main() {
+ // test functions
+ namedArgumentsFunc1(t0Instance, t2: t0Instance);
+ positionalArgumentsFunc1(t0Instance, t0Instance);
+
+ // test class constructors
+ ArgumentsBindingClass instance1 = new ArgumentsBindingClass(t0Instance);
+ instance1 = new ArgumentsBindingClass.fNamed(t0Instance, t2: t0Instance);
+ instance1 = new ArgumentsBindingClass.fPositional(t0Instance, t0Instance);
+ instance1 = new ArgumentsBindingClass.named(t0Instance, t2: t0Instance);
+ instance1 = new ArgumentsBindingClass.positional(t0Instance, t0Instance);
+
+ // tests methods and setters
+ instance1.namedArgumentsMethod(t0Instance, t2: t0Instance);
+ instance1.positionalArgumentsMethod(t0Instance, t0Instance);
+ instance1.testSetter = t0Instance;
+
+ // test static methods
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance, t2: t0Instance);
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance, t0Instance);
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ // test generic functions
+ namedArgumentsFunc2<Object>(t0Instance, t2: t0Instance);
+ positionalArgumentsFunc2<Object>(t0Instance, t0Instance);
+
+ // test generic class constructors
+ ArgumentsBindingGen<Object> instance2 = new ArgumentsBindingGen<Object>(t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.fNamed(t0Instance, t2: t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.fPositional(t0Instance, t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.named(t0Instance, t2: t0Instance);
+ instance2 = new ArgumentsBindingGen<Object>.positional(t0Instance, t0Instance);
+
+ // test generic class methods and setters
+ instance2.namedArgumentsMethod(t0Instance, t2: t0Instance);
+ instance2.positionalArgumentsMethod(t0Instance, t0Instance);
+ instance2.testSetter = t0Instance;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t02.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t02.dart
new file mode 100644
index 0000000..657082f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t02.dart
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test superclass members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(dynamic t1) : super(t1) {}
+ ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingSuper2_t02<X> {
+ X m;
+
+ ArgumentsBindingSuper2_t02(X value) {}
+ ArgumentsBindingSuper2_t02.named(X value, {X val2}) {}
+ ArgumentsBindingSuper2_t02.positional(X value, [X val2]) {}
+ ArgumentsBindingSuper2_t02.short(this.m);
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t02<X> extends ArgumentsBindingSuper2_t02<X> {
+ ArgumentsBinding2_t02(X t1) : super(t1) {}
+ ArgumentsBinding2_t02.c1(dynamic t1) : super.named(t1) {}
+ ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {}
+ ArgumentsBinding2_t02.c3(dynamic t1) : super.positional(t1) {}
+ ArgumentsBinding2_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {}
+ ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {}
+
+ test(X t1, X t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c1(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c2(t1Instance, t0Instance);
+ c1 = new ArgumentsBinding1_t02.c3(t0Instance);
+ c1 = new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);
+ c1 = new ArgumentsBinding1_t02.c5(t0Instance);
+
+ c1.test(t0Instance, t1Instance);
+ c1.superTest(t0Instance);
+ c1.superTestPositioned(t0Instance);
+ c1.superTestPositioned(t1Instance, t0Instance);
+ c1.superTestNamed(t0Instance);
+ c1.superTestNamed(t1Instance, val2: t0Instance);
+ c1.superSetter = t0Instance;
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t02<Object> c2 =
+ new ArgumentsBinding2_t02<Object>(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c1(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c2(t1Instance, t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c3(t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c4(t1Instance, t0Instance);
+ c2 = new ArgumentsBinding2_t02<Object>.c5(t0Instance);
+
+ c2.test(t0Instance, t1Instance);
+ c2.superTest(t0Instance);
+ c2.superTestPositioned(t0Instance);
+ c2.superTestPositioned(t1Instance, t0Instance);
+ c2.superTestNamed(t0Instance);
+ c2.superTestNamed(t1Instance, val2: t0Instance);
+ c2.superSetter = t0Instance;
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t03.dart b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t03.dart
new file mode 100644
index 0000000..b1d7008
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_arguments_binding_A05_t03.dart
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as an argument of type T1. Test mixin members
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * arguments_binding_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingMixin1_t03 {
+ Object m;
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => m;
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+class ArgumentsBindingMixin2_t03<X> {
+ X m;
+
+ void superTest(X val) {}
+ void superTestPositioned(X val, [X val2]) {}
+ void superTestNamed(X val, {X val2}) {}
+ X get superGetter => m;
+ void set superSetter(X val) {}
+}
+
+class ArgumentsBinding2_t03<X> extends Object with ArgumentsBindingMixin2_t03<X> {
+
+ test(dynamic t1, dynamic t2) {
+ superTest(t1);
+ superTestPositioned(t1);
+ superTestPositioned(t2, t1);
+ superTestNamed(t1);
+ superTestNamed(t2, val2: t1);
+ superSetter = t1;
+ m = t1;
+ superGetter;
+ }
+}
+
+main() {
+ ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03();
+
+ c1.test(t0Instance, t1Instance);
+ c1.superTest(t0Instance);
+ c1.superTestPositioned(t0Instance);
+ c1.superTestPositioned(t1Instance, t0Instance);
+ c1.superTestNamed(t0Instance);
+ c1.superTestNamed(t1Instance, val2: t0Instance);
+ c1.superSetter = t0Instance;
+ c1.superGetter;
+
+ // Test type parameters
+
+ //# <-- NotGenericFunctionType
+ ArgumentsBinding2_t03<Object> c2 = new ArgumentsBinding2_t03<Object>();
+ c2.test(t0Instance, t1Instance);
+ c2.superTest(t0Instance);
+ c2.superTestPositioned(t0Instance);
+ c2.superTestPositioned(t1Instance, t0Instance);
+ c2.superTestNamed(t0Instance);
+ c2.superTestNamed(t1Instance, val2: t0Instance);
+ c2.superSetter = t0Instance;
+ c2.superGetter;
+ //# -->
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t01.dart
new file mode 100644
index 0000000..1753ab1
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t01.dart
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMember1_t01 {
+ static Object s = t0Instance;
+ Object m = t0Instance;
+ Object _p = t0Instance;
+
+ ClassMember1_t01() {
+ s = t0Instance;
+ m = t0Instance;
+ _p = t0Instance;
+ }
+
+ ClassMember1_t01.named(Object value) {
+ s = value;
+ m = value;
+ _p = value;
+ }
+
+ ClassMember1_t01.short(this.m, this._p);
+
+ test() {
+ s = t0Instance;
+ m = t0Instance;
+ _p = t0Instance;
+ }
+
+ set setter(Object val) {
+ _p = val;
+ }
+
+ Object get getter => _p;
+
+ static staticTest() {
+ s = t0Instance;
+ }
+
+ static set staticSetter(Object val) {
+ s = val;
+ }
+
+ static Object get staticGetter => t0Instance;
+}
+
+main() {
+ ClassMember1_t01 c1 = new ClassMember1_t01();
+ c1 = new ClassMember1_t01.short(t0Instance,
+ t0Instance);
+ c1 = new ClassMember1_t01.named(t0Instance);
+ c1.m = t0Instance;
+ c1.test();
+ c1.setter = t0Instance;
+ c1.getter;
+
+ ClassMember1_t01.s = t0Instance;
+ ClassMember1_t01.staticTest();
+ ClassMember1_t01.staticSetter = t0Instance;
+ ClassMember1_t01.staticGetter;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t02.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t02.dart
new file mode 100644
index 0000000..815f8d2
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t02.dart
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(t0Instance) {}
+
+ ClassMember1_t02.named() : super.named(t0Instance) {}
+
+ ClassMember1_t02.short() : super.short(t0Instance);
+
+ test() {
+ m = t0Instance;
+ superSetter = t0Instance;
+ }
+}
+
+main() {
+ ClassMember1_t02 c1 = new ClassMember1_t02();
+ c1 = new ClassMember1_t02.short();
+ c1 = new ClassMember1_t02.named();
+ c1.m = t0Instance;
+ c1.test();
+ c1.superSetter = t0Instance;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t03.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t03.dart
new file mode 100644
index 0000000..87bb273
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A04_t03.dart
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * class_member_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberMixin1_t03 {
+ Object m;
+
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 {
+ test() {
+ m = t0Instance;
+ superSetter = t0Instance;
+ }
+}
+
+main() {
+ ClassMember1_t03 c1 = new ClassMember1_t03();
+ c1.m = t0Instance;
+ c1.test();
+ c1.superSetter = t0Instance;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t01.dart
new file mode 100644
index 0000000..9cb9e6e
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t01.dart
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the class member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMember1_t01 {
+ static Object s = t0Instance;
+ Object m = t0Instance;
+ Object _p = t0Instance;
+
+ ClassMember1_t01() {
+ s = t0Instance;
+ m = t0Instance;
+ _p = t0Instance;
+ }
+
+ ClassMember1_t01.named(Object value) {
+ s = value;
+ m = value;
+ _p = value;
+ }
+
+ ClassMember1_t01.short(this.m, this._p);
+
+ test() {
+ s = t0Instance;
+ m = t0Instance;
+ _p = t0Instance;
+ }
+
+ set setter(Object val) {
+ _p = val;
+ }
+
+ Object get getter => _p;
+
+ static staticTest() {
+ s = t0Instance;
+ }
+
+ static set staticSetter(Object val) {
+ s = val;
+ }
+
+ static Object get staticGetter => t0Instance;
+}
+
+main() {
+ ClassMember1_t01 c1 = new ClassMember1_t01();
+ c1 = new ClassMember1_t01.short(t0Instance,
+ t0Instance);
+ c1 = new ClassMember1_t01.named(t0Instance);
+ c1.m = t0Instance;
+ c1.test();
+ c1.setter = t0Instance;
+ c1.getter;
+
+ ClassMember1_t01.s = t0Instance;
+ ClassMember1_t01.staticTest();
+ ClassMember1_t01.staticSetter = t0Instance;
+ ClassMember1_t01.staticGetter;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t02.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t02.dart
new file mode 100644
index 0000000..82f9041
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t02.dart
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the superclass member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x02.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.named(dynamic value) {
+ m = value;
+ }
+
+ ClassMemberSuper1_t02.short(this.m);
+
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+
+ ClassMember1_t02() : super(t0Instance) {}
+
+ ClassMember1_t02.named() : super.named(t0Instance) {}
+
+ ClassMember1_t02.short() : super.short(t0Instance);
+
+ test() {
+ m = t0Instance;
+ superSetter = t0Instance;
+ }
+}
+
+main() {
+ ClassMember1_t02 c1 = new ClassMember1_t02();
+ c1 = new ClassMember1_t02.short();
+ c1 = new ClassMember1_t02.named();
+ c1.m = t0Instance;
+ c1.test();
+ c1.superSetter = t0Instance;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t03.dart b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t03.dart
new file mode 100644
index 0000000..e3bd9de
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_class_member_A05_t03.dart
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the mixin member of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * class_member_x03.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberMixin1_t03 {
+ Object m;
+
+ void set superSetter(dynamic val) {}
+}
+
+class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 {
+ test() {
+ m = t0Instance;
+ superSetter = t0Instance;
+ }
+}
+
+main() {
+ ClassMember1_t03 c1 = new ClassMember1_t03();
+ c1.m = t0Instance;
+ c1.test();
+ c1.superSetter = t0Instance;
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_fail_t01_t01.dart
new file mode 100644
index 0000000..59542d1
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_fail_t01_t01.dart
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(T0 t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_mixin_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_mixin_fail_t01_t01.dart
new file mode 100644
index 0000000..41ea9fc
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_mixin_fail_t01_t01.dart
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_super_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_super_fail_t01_t01.dart
new file mode 100644
index 0000000..e7ef21f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_arguments_binding_super_fail_t01_t01.dart
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(T0 t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(T0 t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, T0 t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(T0 t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, T0 t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_fail_t01_t01.dart
new file mode 100644
index 0000000..8d2207b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_fail_t01_t01.dart
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(T0 val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(T0 val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(T0 val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(T0 val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(T0 val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(T0 val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(T0 val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(T0 val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_mixin_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_mixin_fail_t01_t01.dart
new file mode 100644
index 0000000..df12ffc
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_mixin_fail_t01_t01.dart
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_super_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_super_fail_t01_t01.dart
new file mode 100644
index 0000000..0937d1a
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_class_member_super_fail_t01_t01.dart
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(T0 value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(T0 value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_global_variable_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_global_variable_fail_t01_t01.dart
new file mode 100644
index 0000000..891556f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_global_variable_fail_t01_t01.dart
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_local_variable_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_local_variable_fail_t01_t01.dart
new file mode 100644
index 0000000..b55a0ff
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_local_variable_fail_t01_t01.dart
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_return_value_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_return_value_fail_t01_t01.dart
new file mode 100644
index 0000000..1b572bb
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A01_return_value_fail_t01_t01.dart
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is an unpromoted type variable with bound B
+ * but B is not subtype of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A01_t01.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class B {}
+class T0 extends B {}
+
+T0 t0Instance = new T0();
+Object t1Instance = new Object();
+
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+
+
+test<T extends B?>(T t0Instance) {
+
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+
+}
+
+main() {
+ test<T0>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_fail_t01_t01.dart
new file mode 100644
index 0000000..0fab560
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_fail_t01_t01.dart
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(S t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_mixin_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_mixin_fail_t01_t01.dart
new file mode 100644
index 0000000..f1e473b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_mixin_fail_t01_t01.dart
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_super_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_super_fail_t01_t01.dart
new file mode 100644
index 0000000..cf1900d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_arguments_binding_super_fail_t01_t01.dart
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(S t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(S t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, S t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(S t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, S t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_fail_t01_t01.dart
new file mode 100644
index 0000000..a2bfad1
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_fail_t01_t01.dart
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(S val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(S val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(S val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(S val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(S val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(S val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(S val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(S val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_mixin_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_mixin_fail_t01_t01.dart
new file mode 100644
index 0000000..cbb605c
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_mixin_fail_t01_t01.dart
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_super_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_super_fail_t01_t01.dart
new file mode 100644
index 0000000..befe7c2
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_class_member_super_fail_t01_t01.dart
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(S value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(S value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_global_variable_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_global_variable_fail_t01_t01.dart
new file mode 100644
index 0000000..ceb08b2
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_global_variable_fail_t01_t01.dart
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_local_variable_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_local_variable_fail_t01_t01.dart
new file mode 100644
index 0000000..286532a
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_local_variable_fail_t01_t01.dart
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_return_value_fail_t01_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_return_value_fail_t01_t01.dart
new file mode 100644
index 0000000..2b0d8d3
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_A02_return_value_fail_t01_t01.dart
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is a promoted type variable X & S and
+ * S is not subtype of Object then T0 is not subtype of Object
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A02_t01.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+class X {}
+class S extends X {}
+
+S t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+
+
+test<T>(T t0Instance) {
+ if (t0Instance is S?) {
+
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+
+ }
+}
+
+main() {
+ test<X>(t0Instance);
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A03_t01.dart
new file mode 100644
index 0000000..e1e1206
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A03_t01.dart
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(FutureOr<S?> t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+main() {
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A04_t01.dart
new file mode 100644
index 0000000..b023fdb
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A04_t01.dart
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(FutureOr<S?> t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+main() {
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A05_t01.dart
new file mode 100644
index 0000000..b29a50f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A05_t01.dart
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(FutureOr<X> t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+main() {
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A06_t01.dart
new file mode 100644
index 0000000..a875985
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_fail_A06_t01.dart
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Global function required argument is
+ * tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+namedArgumentsFunc1(Object t1, {Object t2}) {}
+positionalArgumentsFunc1(Object t1, [Object t2]) {}
+
+class ArgumentsBindingClass {
+ ArgumentsBindingClass(Object t1) {}
+
+ ArgumentsBindingClass.named(Object t1, {Object t2}) {}
+ ArgumentsBindingClass.positional(Object t1, [Object t2]) {}
+
+ factory ArgumentsBindingClass.fNamed(Object t1, {Object t2}) {
+ return new ArgumentsBindingClass.named(t1, t2: t2);
+ }
+ factory ArgumentsBindingClass.fPositional(Object t1, [Object t2]) {
+ return new ArgumentsBindingClass.positional(t1, t2);
+ }
+
+ static namedArgumentsStaticMethod(Object t1, {Object t2}) {}
+ static positionalArgumentsStaticMethod(Object t1, [Object t2]) {}
+
+ namedArgumentsMethod(Object t1, {Object t2}) {}
+ positionalArgumentsMethod(Object t1, [Object t2]) {}
+
+ set testSetter(Object val) {}
+}
+
+class ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingClassSuper(Object t1) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { //# 23: compile-time error
+ ArgumentsBindingDesc(FutureOr<X> t0) : super (t0) {} //# 23: compile-time error
+} //# 23: compile-time error
+
+main() {
+ namedArgumentsFunc1(t0Instance); //# 01: compile-time error
+ namedArgumentsFunc1(t1Instance, t2: t0Instance); //# 02: compile-time error
+ positionalArgumentsFunc1(t0Instance); //# 03: compile-time error
+ positionalArgumentsFunc1(t1Instance, t0Instance); //# 04: compile-time error
+ new ArgumentsBindingClass(t0Instance); //# 05: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); //# 06: compile-time error
+ new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); //# 07: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); //# 08: compile-time error
+ new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; //# 10: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); //# 11: compile-time error
+ ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); //# 12: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); //# 13: compile-time error
+ ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); //# 14: compile-time error
+ new ArgumentsBindingClass.named(t0Instance); //# 15: compile-time error
+ new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); //# 16: compile-time error
+ new ArgumentsBindingClass.positional(t0Instance); //# 17: compile-time error
+ new ArgumentsBindingClass.positional(t1Instance, t0Instance); //# 18: compile-time error
+ new ArgumentsBindingClass.fNamed(t0Instance); //# 19: compile-time error
+ new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); //# 20: compile-time error
+ new ArgumentsBindingClass.fPositional(t0Instance); //# 21: compile-time error
+ new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); //# 22: compile-time error
+ new ArgumentsBindingDesc(t0Instance); //# 23: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A03_t01.dart
new file mode 100644
index 0000000..fb6b3fe
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A03_t01.dart
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A04_t01.dart
new file mode 100644
index 0000000..0a7d8aa
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A04_t01.dart
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A05_t01.dart
new file mode 100644
index 0000000..31b0fce
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A05_t01.dart
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A06_t01.dart
new file mode 100644
index 0000000..4a23052
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_mixin_fail_A06_t01.dart
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test mixin members. Super method required
+ * argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t03 {
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 07: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 {
+
+ test() {
+ superTest(t0Instance); //# 08: compile-time error
+
+ this.superTest(t0Instance); //# 09: compile-time error
+
+ super.superTest(t0Instance); //# 10: compile-time error
+
+ superTestPositioned(t0Instance); //# 11: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 12: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 13: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 14: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 15: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 16: compile-time error
+
+ superTestNamed(t0Instance); //# 17: compile-time error
+
+ this.superTestNamed(t0Instance); //# 18: compile-time error
+
+ super.superTestNamed(t0Instance); //# 19: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 20: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 21: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 22: compile-time error
+
+ superSetter = t0Instance; //# 23: compile-time error
+
+ this.superSetter = t0Instance; //# 24: compile-time error
+
+ super.superSetter = t0Instance; //# 25: compile-time error
+
+ superGetter; //# 07: compile-time error
+
+ this.superGetter; //# 07: compile-time error
+
+ super.superGetter; //# 07: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t03().superTest(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); //# 05: compile-time error
+ new ArgumentsBinding1_t03().superSetter = t0Instance; //# 06: compile-time error
+ new ArgumentsBinding1_t03().superGetter; //# 07: compile-time error
+ new ArgumentsBinding1_t03().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A03_t01.dart
new file mode 100644
index 0000000..47bd9fc
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A03_t01.dart
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(FutureOr<S?> t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(FutureOr<S?> t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, FutureOr<S?> t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(FutureOr<S?> t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, FutureOr<S?> t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A04_t01.dart
new file mode 100644
index 0000000..33c1e45
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A04_t01.dart
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(FutureOr<S?> t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(FutureOr<S?> t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, FutureOr<S?> t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(FutureOr<S?> t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, FutureOr<S?> t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A05_t01.dart
new file mode 100644
index 0000000..4a65216
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A05_t01.dart
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(FutureOr<X> t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(FutureOr<X> t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, FutureOr<X> t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(FutureOr<X> t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, FutureOr<X> t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A06_t01.dart
new file mode 100644
index 0000000..77d273e
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_arguments_binding_super_fail_A06_t01.dart
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as an argument of type T1. Test superclass members. Super constructor
+ * required argument is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * arguments_binding_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ArgumentsBindingSuper1_t02 {
+ Object m;
+
+ ArgumentsBindingSuper1_t02(Object value) {}
+ ArgumentsBindingSuper1_t02.named(Object value, {Object val2}) {}
+ ArgumentsBindingSuper1_t02.positional(Object value, [Object val2]) {}
+ ArgumentsBindingSuper1_t02.short(this.m);
+
+ void superTest(Object val) {}
+ void superTestPositioned(Object val, [Object val2]) {}
+ void superTestNamed(Object val, {Object val2}) {}
+ Object get superGetter => t0Instance; //# 35: compile-time error
+ void set superSetter(Object val) {}
+}
+
+class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 {
+ ArgumentsBinding1_t02(FutureOr<X> t1) : super(t1) {} //# 01: compile-time error
+ ArgumentsBinding1_t02.c1(FutureOr<X> t1) : super.named(t1) {} //# 02: compile-time error
+ ArgumentsBinding1_t02.c2(Object t1, FutureOr<X> t2) : super.named(t1, val2: t2) {} //# 03: compile-time error
+ ArgumentsBinding1_t02.c3(FutureOr<X> t1) : super.positional(t1) {} //# 04: compile-time error
+ ArgumentsBinding1_t02.c4(Object t1, FutureOr<X> t2) : super.positional(t1, t2) {} //# 05: compile-time error
+ ArgumentsBinding1_t02.c5(Object t1) : super.short(t1) {} //# 06: compile-time error
+
+ ArgumentsBinding1_t02.valid() : super(null) {}
+
+ test() {
+ superTest(t0Instance); //# 14: compile-time error
+
+ this.superTest(t0Instance); //# 15: compile-time error
+
+ super.superTest(t0Instance); //# 16: compile-time error
+
+ superTestPositioned(t0Instance); //# 17: compile-time error
+
+ this.superTestPositioned(t0Instance); //# 18: compile-time error
+
+ super.superTestPositioned(t0Instance); //# 19: compile-time error
+
+ superTestPositioned(t1Instance, t0Instance); //# 20: compile-time error
+
+ this.superTestPositioned(t1Instance, t0Instance); //# 21: compile-time error
+
+ super.superTestPositioned(t1Instance, t0Instance); //# 22: compile-time error
+
+ superTestNamed(t0Instance); //# 23: compile-time error
+
+ this.superTestNamed(t0Instance); //# 24: compile-time error
+
+ super.superTestNamed(t0Instance); //# 25: compile-time error
+
+ superTestNamed(t1Instance, val2: t0Instance); //# 26: compile-time error
+
+ this.superTestNamed(t1Instance, val2: t0Instance); //# 27: compile-time error
+
+ super.superTestNamed(t1Instance, val2: t0Instance); //# 28: compile-time error
+
+ superSetter = t0Instance; //# 29: compile-time error
+
+ this.superSetter = t0Instance; //# 30: compile-time error
+
+ super.superSetter = t0Instance; //# 31: compile-time error
+
+ superGetter; //# 32: compile-time error
+
+ this.superGetter; //# 33: compile-time error
+
+ super.superGetter; //# 34: compile-time error
+ }
+}
+
+main() {
+ new ArgumentsBinding1_t02(t0Instance); //# 01: compile-time error
+ new ArgumentsBinding1_t02.c1(t0Instance); //# 02: compile-time error
+ new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); //# 03: compile-time error
+ new ArgumentsBinding1_t02.c3(t0Instance); //# 04: compile-time error
+ new ArgumentsBinding1_t02.c4(t1Instance, t0Instance);//# 05: compile-time error
+ new ArgumentsBinding1_t02.c5(t0Instance); //# 06: compile-time error
+ new ArgumentsBinding1_t02.valid().superTest(t0Instance); //# 07: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); //# 08: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); //# 09: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); //# 10: compile-time error
+ new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); //# 11: compile-time error
+ new ArgumentsBinding1_t02.valid().superSetter = t0Instance; //# 12: compile-time error
+ new ArgumentsBinding1_t02.valid().superGetter; //# 13: compile-time error
+ new ArgumentsBinding1_t02.valid().test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A03_t01.dart
new file mode 100644
index 0000000..519146b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A03_t01.dart
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(FutureOr<S?> val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(FutureOr<S?> val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(FutureOr<S?> val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(FutureOr<S?> val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(FutureOr<S?> val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(FutureOr<S?> val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(FutureOr<S?> val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(FutureOr<S?> val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+main() {
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+}
+
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A04_t01.dart
new file mode 100644
index 0000000..1edb8a3
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A04_t01.dart
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(FutureOr<S?> val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(FutureOr<S?> val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(FutureOr<S?> val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(FutureOr<S?> val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(FutureOr<S?> val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(FutureOr<S?> val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(FutureOr<S?> val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(FutureOr<S?> val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+main() {
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+}
+
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A05_t01.dart
new file mode 100644
index 0000000..5ba1015
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A05_t01.dart
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(FutureOr<X> val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(FutureOr<X> val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(FutureOr<X> val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(FutureOr<X> val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(FutureOr<X> val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(FutureOr<X> val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(FutureOr<X> val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(FutureOr<X> val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+main() {
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+}
+
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A06_t01.dart
new file mode 100644
index 0000000..5ca3b18
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_fail_A06_t01.dart
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then it cannot
+ * be used as a class member of type T1. Assignment to static and instance class
+ * variables is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberTestStatic {
+ static Object s;
+
+ ClassMemberTestStatic(FutureOr<X> val) {
+ s = val; //# 01: compile-time error
+ }
+
+ static staticTest() {
+ s = t0Instance; //# 04: compile-time error
+ }
+
+ static set staticSetter(FutureOr<X> val) {
+ s = val; //# 02: compile-time error
+ }
+
+ static Object get staticGetter => t0Instance; //# 03: compile-time error
+}
+
+class ClassMemberTestPublic {
+ Object m;
+
+ ClassMemberTestPublic(FutureOr<X> val) {
+ m = val; //# 05: compile-time error
+ }
+
+ ClassMemberTestPublic.short(this.m);
+
+ ClassMemberTestPublic.validConstructor() {}
+
+ test(FutureOr<X> val) {
+ m = val; //# 08: compile-time error
+ }
+
+ set setter(FutureOr<X> val) {
+ m = val; //# 07: compile-time error
+ }
+
+ Object get getter => t0Instance; //# 09: compile-time error
+}
+
+class ClassMemberTestPrivate {
+ Object _m;
+
+ ClassMemberTestPrivate(FutureOr<X> val) {
+ _m = val; //# 10: compile-time error
+ }
+
+ ClassMemberTestPrivate.short(this._m);
+
+ ClassMemberTestPrivate.validConstructor() {}
+
+ test(FutureOr<X> val) {
+ _m = val; //# 12: compile-time error
+ }
+
+ set setter(FutureOr<X> val) {
+ _m = val; //# 11: compile-time error
+ }
+}
+
+class ClassMemberTestInitFail {
+ static Object s = t0Instance; //# 13: compile-time error
+ Object m = t0Instance; //# 14: compile-time error
+}
+
+
+main() {
+ new ClassMemberTestStatic(t0Instance); //# 01: compile-time error
+ ClassMemberTestStatic.staticSetter = t0Instance; //# 02: compile-time error
+ ClassMemberTestStatic.staticGetter; //# 03: compile-time error
+ ClassMemberTestStatic.staticTest(); //# 04: compile-time error
+ new ClassMemberTestPublic(t0Instance); //# 05: compile-time error
+ new ClassMemberTestPublic.validConstructor().m = t0Instance; //# 06: compile-time error
+ new ClassMemberTestPublic.validConstructor().setter = t0Instance; //# 07: compile-time error
+ new ClassMemberTestPublic.validConstructor().test(t0Instance); //# 08: compile-time error
+ new ClassMemberTestPublic.validConstructor().getter; //# 09: compile-time error
+ new ClassMemberTestPrivate(t0Instance); //# 10: compile-time error
+ new ClassMemberTestPrivate.validConstructor().setter = t0Instance; //# 11: compile-time error
+ new ClassMemberTestPrivate.validConstructor().test(t0Instance); //# 12: compile-time error
+ ClassMemberTestInitFail.s; //# 13: compile-time error
+ new ClassMemberTestInitFail(); //# 14: compile-time error
+}
+
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A03_t01.dart
new file mode 100644
index 0000000..3c461d1
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A03_t01.dart
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A04_t01.dart
new file mode 100644
index 0000000..464239b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A04_t01.dart
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A05_t01.dart
new file mode 100644
index 0000000..d5578fe
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A05_t01.dart
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A06_t01.dart
new file mode 100644
index 0000000..091c0d8
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_mixin_fail_A06_t01.dart
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the mixin member of type T1.
+ * Assignment to instance variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_mixin_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t03 {
+ Object m;
+ void set superSetter(Object val) {} //# 02: compile-time error
+}
+
+class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 {
+ test1() {
+ m = t0Instance; //# 03: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 04: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t03().m = t0Instance; //# 01: compile-time error
+ new ClassMember1_t03().superSetter = t0Instance; //# 02: compile-time error
+ new ClassMember1_t03().test1(); //# 03: compile-time error
+ new ClassMember1_t03().test2(); //# 04: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A03_t01.dart
new file mode 100644
index 0000000..a0b0bf0
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A03_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(FutureOr<S?> value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(FutureOr<S?> value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A04_t01.dart
new file mode 100644
index 0000000..622282f
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A04_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(FutureOr<S?> value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(FutureOr<S?> value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A05_t01.dart
new file mode 100644
index 0000000..e06997d
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A05_t01.dart
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(FutureOr<X> value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(FutureOr<X> value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A06_t01.dart
new file mode 100644
index 0000000..14b7134
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_class_member_super_fail_A06_t01.dart
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the superclass member of type T1.
+ * Assignment to variable of super class is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * class_member_super_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class ClassMemberSuper1_t02 {
+ Object m;
+
+ ClassMemberSuper1_t02(FutureOr<X> value) {
+ m = value; //# 01: compile-time error
+ }
+ ClassMemberSuper1_t02.named(FutureOr<X> value) {
+ m = value; //# 02: compile-time error
+ }
+ void set superSetter(Object val) {}
+}
+
+class ClassMember1_t02 extends ClassMemberSuper1_t02 {
+ ClassMember1_t02() : super(t0Instance) {} //# 01: compile-time error
+ ClassMember1_t02.named() : super.named(t0Instance) {} //# 02: compile-time error
+ ClassMember1_t02.valid() : super(null);
+ test1() {
+ m = t0Instance; //# 05: compile-time error
+ }
+ test2() {
+ superSetter = t0Instance; //# 06: compile-time error
+ }
+}
+
+main() {
+ new ClassMember1_t02(); //# 01: compile-time error
+ new ClassMember1_t02.named(); //# 02: compile-time error
+ new ClassMember1_t02.valid().m = t0Instance; //# 03: compile-time error
+ new ClassMember1_t02.valid().superSetter = t0Instance; //# 04: compile-time error
+ new ClassMember1_t02.valid().test1(); //# 05: compile-time error
+ new ClassMember1_t02.valid().test2(); //# 06: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A03_t01.dart
new file mode 100644
index 0000000..670ec85
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A03_t01.dart
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A04_t01.dart
new file mode 100644
index 0000000..81793ee
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A04_t01.dart
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A05_t01.dart
new file mode 100644
index 0000000..b231343
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A05_t01.dart
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A06_t01.dart
new file mode 100644
index 0000000..37df8bb
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_global_variable_fail_A06_t01.dart
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to global variable of type T1.
+ * Assignment to global variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * global_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance; //# 03: compile-time error
+ }
+ GlobalVariableTest.valid() {}
+
+ foo() {
+ t1Instance = t0Instance; //# 04: compile-time error
+ }
+ static test() {
+ t1Instance = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ t1Instance = t0Instance; //# 01: compile-time error
+
+ bar () {
+ t1Instance = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new GlobalVariableTest(); //# 03: compile-time error
+ new GlobalVariableTest.valid().foo(); //# 04: compile-time error
+ GlobalVariableTest.test(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A03_t01.dart
new file mode 100644
index 0000000..6ee0b23
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A03_t01.dart
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A04_t01.dart
new file mode 100644
index 0000000..780554e
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A04_t01.dart
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A05_t01.dart
new file mode 100644
index 0000000..c1b3569
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A05_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A06_t01.dart
new file mode 100644
index 0000000..3f5ceda
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_local_variable_fail_A06_t01.dart
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is not a subtype of a type T1, then
+ * instance of T0 cannot be be assigned to the to local variable of type T1.
+ * Assignment to local variable is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * local_variable_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+ LocalVariableTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 03: compile-time error
+ }
+
+ LocalVariableTest.valid() {}
+
+ test() {
+ Object t1 = null;
+ t1 = t0Instance; //# 04: compile-time error
+ }
+
+ static staticTest() {
+ Object t1 = null;
+ t1 = t0Instance; //# 05: compile-time error
+ }
+}
+
+main() {
+ Object t1 = null;
+ t1 = t0Instance; //# 01: compile-time error
+
+ bar () {
+ Object t1 = null;
+ t1 = t0Instance; //# 02: compile-time error
+ }
+ bar(); //# 02: compile-time error
+
+ new LocalVariableTest(); //# 03: compile-time error
+ new LocalVariableTest.valid().test(); //# 04: compile-time error
+ LocalVariableTest.staticTest(); //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A03_t01.dart
new file mode 100644
index 0000000..2adb55b
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A03_t01.dart
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A03.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+main() {
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A04_t01.dart
new file mode 100644
index 0000000..24a75e4
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A04_t01.dart
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A04.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S?> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+main() {
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A05_t01.dart
new file mode 100644
index 0000000..c09f5cf
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A05_t01.dart
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A05.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new X();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+main() {
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A06_t01.dart
new file mode 100644
index 0000000..fd4e097
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_fail_return_value_fail_A06_t01.dart
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 not a subtype of a type T1, then instance
+ * of T0 cannot be be used as a return value of type T1. Return value is tested.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ * @author ngl@unipro.ru
+ */
+/*
+ * This test is generated from right_object_fail_A06.dart and
+ * return_value_fail_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+import "../utils/legacy_lib.dart";
+
+FutureOr<X> t0Instance = new Future.value(new X());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance; //# 01: compile-time error
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance; //# 03: compile-time error
+ Object testMethod() => t0Instance; //# 04: compile-time error
+ Object get testGetter => t0Instance; //# 05: compile-time error
+}
+
+main() {
+ returnValueFunc(); //# 01: compile-time error
+
+ Object returnValueLocalFunc() => t0Instance; //# 02: compile-time error
+ returnValueLocalFunc(); //# 02: compile-time error
+
+ ReturnValueTest.staticTestMethod(); //# 03: compile-time error
+ new ReturnValueTest().testMethod(); //# 04: compile-time error
+ new ReturnValueTest().testGetter; //# 05: compile-time error
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A04_t01.dart
new file mode 100644
index 0000000..6d6c6f8
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A04_t01.dart
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * global_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance;
+ }
+
+ foo() {
+ t1Instance = t0Instance;
+ }
+
+ static test() {
+ t1Instance = t0Instance;
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = t0Instance;
+ }
+
+ t1Instance = t0Instance;
+ bar();
+ GlobalVariableTest t = new GlobalVariableTest();
+ t.foo();
+ GlobalVariableTest.test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A05_t01.dart
new file mode 100644
index 0000000..0b00a75
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_global_variable_A05_t01.dart
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to global variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * global_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class GlobalVariableTest {
+ GlobalVariableTest() {
+ t1Instance = t0Instance;
+ }
+
+ foo() {
+ t1Instance = t0Instance;
+ }
+
+ static test() {
+ t1Instance = t0Instance;
+ }
+}
+
+main() {
+ bar () {
+ t1Instance = t0Instance;
+ }
+
+ t1Instance = t0Instance;
+ bar();
+ GlobalVariableTest t = new GlobalVariableTest();
+ t.foo();
+ GlobalVariableTest.test();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A04_t01.dart
new file mode 100644
index 0000000..be7e363
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A04_t01.dart
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * local_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ static staticTest() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ test() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+}
+
+main() {
+ foo() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ foo();
+ LocalVariableTest x = new LocalVariableTest();
+ x.test();
+ LocalVariableTest.staticTest();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A05_t01.dart
new file mode 100644
index 0000000..912be8c
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_local_variable_A05_t01.dart
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be assigned to the to local variable of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * local_variable_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+class LocalVariableTest {
+
+ LocalVariableTest() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ static staticTest() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ test() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+}
+
+main() {
+ foo() {
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ }
+
+ Object t1 = t0Instance;
+ t1 = t0Instance;
+ foo();
+ LocalVariableTest x = new LocalVariableTest();
+ x.test();
+ LocalVariableTest.staticTest();
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A04_t01.dart
new file mode 100644
index 0000000..ae4f1a2
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A04_t01.dart
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A04.dart and
+ * return_value_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance;
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance;
+
+ Object testMethod() => t0Instance;
+
+ Object get testGetter => t0Instance;
+}
+
+main() {
+ Object returnValueLocalFunc() => t0Instance;
+
+ returnValueFunc();
+ returnValueLocalFunc();
+
+ ReturnValueTest.staticTestMethod();
+
+ new ReturnValueTest().testMethod();
+ new ReturnValueTest().testGetter;
+
+}
diff --git a/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A05_t01.dart
new file mode 100644
index 0000000..d759a3c
--- /dev/null
+++ b/LanguageFeatures/Subtyping/static/generated/right_object_return_value_A05_t01.dart
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+/**
+ * @assertion We say that a type T0 is a subtype of a type T1 (written T0 <: T1)
+ * when:
+ * Right Object: if T1 is Object then:
+ * - if T0 is an unpromoted type variable with bound B then T0 <: T1 iff
+ * B <: Object
+ * - if T0 is a promoted type variable X & S then T0 <: T1 iff S <: Object
+ * - if T0 is FutureOr<S> for some S, then T0 <: T1 iff S <: Object.
+ * - if T0 is S* for any S, then T0 <: T1 iff S <: T1
+ * - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
+ * hold (per above, the result of the subtyping query is false).
+ * - Otherwise T0 <: T1 is true.
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
+ * @author sgrekhov@unipro.ru
+ */
+/**
+ * @description Check that if type T0 is a subtype of a type T1, then instance
+ * of T0 can be be used as a return value of type T1
+ * @author sgrekhov@unipro.ru
+ */
+/*
+ * This test is generated from right_object_A05.dart and
+ * return_value_x01.dart.
+ * Don't modify it. If you want to change this file, change one of the files
+ * above and then run generator.dart to regenerate the tests.
+ */
+
+
+// SharedOptions=--enable-experiment=non-nullable
+import "dart:async";
+
+class S {}
+
+FutureOr<S> t0Instance = new S();
+Object t1Instance = new Object();
+
+
+
+
+Object returnValueFunc() => t0Instance;
+
+class ReturnValueTest {
+ static Object staticTestMethod() => t0Instance;
+
+ Object testMethod() => t0Instance;
+
+ Object get testGetter => t0Instance;
+}
+
+main() {
+ Object returnValueLocalFunc() => t0Instance;
+
+ returnValueFunc();
+ returnValueLocalFunc();
+
+ ReturnValueTest.staticTestMethod();
+
+ new ReturnValueTest().testMethod();
+ new ReturnValueTest().testGetter;
+
+}
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/static/test_types/right_object_fail_A01_t01.dart
similarity index 91%
rename from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
rename to LanguageFeatures/Subtyping/static/test_types/right_object_fail_A01_t01.dart
index 23dd9fe..b813b1f 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/static/test_types/right_object_fail_A01_t01.dart
@@ -26,11 +26,13 @@
T0 t0Instance = new T0();
Object t1Instance = new Object();
+//# @T0 = T0
+//# @T1 = Object
+
+//# <!-- Global variables & classes definition -->
+
test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
+ //# <!-- Test body -->
}
main() {
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A02_t01.dart b/LanguageFeatures/Subtyping/static/test_types/right_object_fail_A02_t01.dart
similarity index 91%
rename from LanguageFeatures/Subtyping/static/tests/right_object_fail_A02_t01.dart
rename to LanguageFeatures/Subtyping/static/test_types/right_object_fail_A02_t01.dart
index 748f796..49b9f26 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A02_t01.dart
+++ b/LanguageFeatures/Subtyping/static/test_types/right_object_fail_A02_t01.dart
@@ -26,12 +26,14 @@
S t0Instance = new S();
Object t1Instance = new Object();
+//# @T0 = S
+//# @T1 = Object
+
+//# <!-- Global variables & classes definition -->
+
test<T>(T t0Instance) {
if (t0Instance is S?) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
+ //# <!-- Test body -->
}
}
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_A04.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_A04.dart
index 23dd9fe..3ff1eaf 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_A04.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,17 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
-T0 t0Instance = new T0();
+class S {}
+
+FutureOr<S> t0Instance = new Future.value(new S());
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<S>
+//# @T1 = Object
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_A05.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_A05.dart
index 23dd9fe..e51d9d8 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_A05.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,17 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S and S <: Object then
+ * T0 is subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
-T0 t0Instance = new T0();
+class S {}
+
+FutureOr<S> t0Instance = new S();
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<S>
+//# @T1 = Object
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_fail_A03.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_fail_A03.dart
index 23dd9fe..7c4d530 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_fail_A03.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,17 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
-T0 t0Instance = new T0();
+class S {}
+
+FutureOr<S?> t0Instance = new Future.value(new S());
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<S?>
+//# @T1 = Object
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_fail_A04.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_fail_A04.dart
index 23dd9fe..4ff7667 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_fail_A04.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,17 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
-T0 t0Instance = new T0();
+class S {}
+
+FutureOr<S?> t0Instance = new S();
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<S?>
+//# @T1 = Object
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_fail_A05.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_fail_A05.dart
index 23dd9fe..e046efc 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_fail_A05.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,16 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
+import "../utils/legacy_lib.dart";
-T0 t0Instance = new T0();
+FutureOr<X> t0Instance = new X();
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<X>
+//# @T1 = Object
diff --git a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart b/LanguageFeatures/Subtyping/test_types/right_object_fail_A06.dart
similarity index 66%
copy from LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
copy to LanguageFeatures/Subtyping/test_types/right_object_fail_A06.dart
index 23dd9fe..8a7e09e 100644
--- a/LanguageFeatures/Subtyping/static/tests/right_object_fail_A01_t01.dart
+++ b/LanguageFeatures/Subtyping/test_types/right_object_fail_A06.dart
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
@@ -15,24 +15,16 @@
* - if T0 is Null, dynamic, void, or S? for any S, then the subtyping does not
* hold (per above, the result of the subtyping query is false).
* - Otherwise T0 <: T1 is true.
- * @description Check that if T0 is an unpromoted type variable with bound B
- * but B is not subtype of Object then T0 is not subtype of T1
+ * @description Check that if T0 is FutureOr<S> for some S but S is not subtype
+ * of Object then T0 is not subtype of T1
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
-class B {}
-class T0 extends B {}
+import "dart:async";
+import "../utils/legacy_lib.dart";
-T0 t0Instance = new T0();
+FutureOr<X> t0Instance = new Future.value(new X());
Object t1Instance = new Object();
-test<T extends B?>(T t0Instance) {
- t1Instance = t0Instance;
-// ^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified}
-}
-
-main() {
- test<T0>(t0Instance);
-}
+//# @T0 = FutureOr<X>
+//# @T1 = Object