| library /*isNonNullableByDefault*/; | |
| // | |
| // Problems in library: | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // static void test1(var v, [A a]) {} | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // static void test2(var v, {A a}) {} | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // void test11(var v, [A a]) {} | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // void test22(var v, {A a}) {} | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // void test1(var v, [A a]) {} | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: The parameter 'a' can't have a value of 'null' because of its type 'A', but the implicit default value is 'null'. | |
| // - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'. | |
| // Try adding either an explicit non-'null' default value or the 'required' modifier. | |
| // void test2(var v, {A a}) {} | |
| // ^ | |
| // | |
| import self as self; | |
| import "dart:core" as core; | |
| class A extends core::Object { | |
| synthetic constructor •() → self::A | |
| : super core::Object::•() | |
| ; | |
| } | |
| class C extends core::Object { | |
| synthetic constructor •() → self::C | |
| : super core::Object::•() | |
| ; | |
| static method test1(dynamic v, [self::A a = #C1]) → void {} | |
| static method test2(dynamic v, {self::A a = #C1}) → void {} | |
| method test11(dynamic v, [self::A a = #C1]) → void {} | |
| method test22(dynamic v, {self::A a = #C1}) → void {} | |
| } | |
| static method test1(dynamic v, [self::A a = #C1]) → void {} | |
| static method test2(dynamic v, {self::A a = #C1}) → void {} | |
| static method main() → dynamic {} | |
| constants { | |
| #C1 = null | |
| } |