blob: e94c384405e94a7bf77e88ee6e2b9870bec175d6 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// static void test1(var v, [A a]) {}
// ^
//
// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// static void test2(var v, {A a}) {}
// ^
//
// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// void test11(var v, [A a]) {}
// ^
//
// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// void test22(var v, {A a}) {}
// ^
//
// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// void test1(var v, [A a]) {}
// ^
//
// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
// - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
// 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
}