| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:10:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // await n; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:13:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // await xn; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:15:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // await nq; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:17:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // await xnq; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:19:21: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // if (x is N) await x; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:20:22: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // if (x is N?) await x; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:21:22: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // if (x is XN) await x; // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue54649.dart:22:23: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| // if (x is XN?) await x; // Error. |
| // ^ |
| // |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| |
| extension type N(asy::Future<core::int> _) { |
| abstract extension-type-member representation-field get _() → asy::Future<core::int>; |
| constructor • = self::N|constructor#; |
| constructor tearoff • = self::N|constructor#_#new#tearOff; |
| } |
| extension type F(asy::Future<core::int> _) implements asy::Future<core::int> { |
| abstract extension-type-member representation-field get _() → asy::Future<core::int>; |
| constructor • = self::F|constructor#; |
| constructor tearoff • = self::F|constructor#_#new#tearOff; |
| } |
| static extension-type-member method N|constructor#(asy::Future<core::int> _) → self::N% /* erasure=asy::Future<core::int>, declared=! */ { |
| lowered final self::N% /* erasure=asy::Future<core::int>, declared=! */ #this = _; |
| return #this; |
| } |
| static extension-type-member method N|constructor#_#new#tearOff(asy::Future<core::int> _) → self::N% /* erasure=asy::Future<core::int>, declared=! */ |
| return self::N|constructor#(_); |
| static extension-type-member method F|constructor#(asy::Future<core::int> _) → self::F /* erasure=asy::Future<core::int> */ { |
| lowered final self::F /* erasure=asy::Future<core::int> */ #this = _; |
| return #this; |
| } |
| static extension-type-member method F|constructor#_#new#tearOff(asy::Future<core::int> _) → self::F /* erasure=asy::Future<core::int> */ |
| return self::F|constructor#(_); |
| static method test<X extends core::Object? = dynamic, XN extends self::N% /* erasure=asy::Future<core::int>, declared=! */, XF extends self::F /* erasure=asy::Future<core::int> */>(self::N% /* erasure=asy::Future<core::int>, declared=! */ n, self::F /* erasure=asy::Future<core::int> */ f, self::test::X% x, self::test::XN% xn, self::test::XF xf, self::N? /* erasure=asy::Future<core::int>? */ nq, self::F? /* erasure=asy::Future<core::int>? */ fq, self::test::XN? xnq, self::test::XF? xfq) → void async /* emittedValueType= void */ { |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:10:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| await n; // Error. |
| ^" in n /* runtimeCheckType= asy::Future<self::N% /* erasure=asy::Future<core::int>, declared=! */> */ ; |
| await f; |
| await x /* runtimeCheckType= asy::Future<self::test::X%> */ ; |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:13:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| await xn; // Error. |
| ^" in xn /* runtimeCheckType= asy::Future<self::test::XN%> */ ; |
| await xf; |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:15:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| await nq; // Error. |
| ^" in nq /* runtimeCheckType= asy::Future<self::N? /* erasure=asy::Future<core::int>? */> */ ; |
| await fq /* runtimeCheckType= asy::Future<core::int?> */ ; |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:17:9: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| await xnq; // Error. |
| ^" in xnq /* runtimeCheckType= asy::Future<self::test::XN?> */ ; |
| await xfq /* runtimeCheckType= asy::Future<core::int?> */ ; |
| if(x is self::N% /* erasure=asy::Future<core::int>, declared=! */) |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:19:21: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| if (x is N) await x; // Error. |
| ^" in x{self::test::X% & self::N% /* erasure=asy::Future<core::int>, declared=! */ /* '%' & '%' = '%' */} /* runtimeCheckType= asy::Future<self::test::X%> */ ; |
| if(x is self::N? /* erasure=asy::Future<core::int>? */) |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:20:22: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| if (x is N?) await x; // Error. |
| ^" in x{self::test::X% & self::N? /* erasure=asy::Future<core::int>? */ /* '%' & '?' = '%' */} /* runtimeCheckType= asy::Future<self::test::X%> */ ; |
| if(x is self::test::XN%) |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:21:22: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| if (x is XN) await x; // Error. |
| ^" in x{self::test::X% & self::test::XN% /* '%' & '%' = '%' */} /* runtimeCheckType= asy::Future<self::test::X%> */ ; |
| if(x is self::test::XN?) |
| await invalid-expression "pkg/front_end/testcases/extension_types/issue54649.dart:22:23: Error: The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'. |
| if (x is XN?) await x; // Error. |
| ^" in x{self::test::X% & self::test::XN? /* '%' & '?' = '%' */} /* runtimeCheckType= asy::Future<self::test::X%> */ ; |
| if(x is self::F /* erasure=asy::Future<core::int> */) |
| await x{self::test::X% & self::F /* erasure=asy::Future<core::int> */ /* '%' & '!' = '!' */}; |
| if(x is self::F? /* erasure=asy::Future<core::int>? */) |
| await x{self::test::X% & self::F? /* erasure=asy::Future<core::int>? */ /* '%' & '?' = '%' */} /* runtimeCheckType= asy::Future<core::int?> */ ; |
| if(x is self::test::XF) |
| await x{self::test::X% & self::test::XF /* '%' & '!' = '!' */}; |
| if(x is self::test::XF?) |
| await x{self::test::X% & self::test::XF? /* '%' & '?' = '%' */} /* runtimeCheckType= asy::Future<core::int?> */ ; |
| } |