| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/nullable_param.dart:4:7: Error: The non-abstract class 'Foo' is missing implementations for these members: |
| // - Foo.bar |
| // Try to either |
| // - provide an implementation, |
| // - inherit an implementation from a superclass or mixin, |
| // - mark the class as abstract, or |
| // - provide a 'noSuchMethod' implementation. |
| // |
| // class Foo { |
| // ^^^ |
| // pkg/front_end/testcases/nnbd/nullable_param.dart:6:8: Context: 'Foo.bar' is defined here. |
| // int? bar(int? x); |
| // ^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class Foo extends core::Object { |
| field core::int* field = null; |
| synthetic constructor •() → self::Foo* |
| : super core::Object::•() |
| ; |
| abstract method bar(core::int* x) → core::int*; |
| } |
| static method main() → dynamic { |
| self::Foo* foo = new self::Foo::•(); |
| foo.{self::Foo::field} = 5; |
| foo.{self::Foo::bar}(6); |
| self::test_nullable_function_type_formal_param(f: () → core::int* => 2); |
| } |
| static method test_nullable_function_type_formal_param({() →* core::int* f = #C1}) → core::int* { |
| return let final core::int* #t1 = f.call() in #t1.==(null) ?{core::int*} 1.{core::int::unary-}() : #t1; |
| } |
| |
| constants { |
| #C1 = null |
| } |