Files
sdk/pkg/front_end/testcases/nnbd/issue40954.dart.weak.expect
T
Johnni Winther 442fa7f44e [cfe] Update message for missing default value
Update in response to issue #44329 and to match the change
in https://dart-review.googlesource.com/c/sdk/+/174300

Change-Id: Ia28887f0fad54927b82b7aa29acb88231053cd6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174800
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-03 14:46:23 +00:00

65 lines
3.1 KiB
Plaintext

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
}