| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| method m(core::int n) → void {} |
| } |
| abstract class I extends core::Object { |
| synthetic constructor •() → self::I |
| : super core::Object::•() |
| ; |
| abstract method m(covariant-by-declaration core::num n) → void; |
| } |
| class C extends self::A implements self::I { |
| synthetic constructor •() → self::C |
| : super self::A::•() |
| ; |
| forwarding-stub method m(covariant-by-declaration core::num n) → void |
| return super.{self::A::m}(n as core::int); |
| } |
| static method main() → void { |
| self::throws(() → void => (new self::C::•() as{ForNonNullableByDefault} dynamic){dynamic}.m(1.1)); |
| } |
| static method throws(() → void f) → dynamic { |
| try { |
| f(){() → void}; |
| } |
| on core::Object catch(final core::Object e) { |
| core::print(e); |
| return; |
| } |
| throw "Exception expected"; |
| } |