c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
48 lines
2.2 KiB
Plaintext
48 lines
2.2 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable.
|
|
// - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
// Null x = null;
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue41700b.dart:9:5: Error: The method 'foo' isn't defined for the class 'Null'.
|
|
// - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
// Try correcting the name to the name of an existing method, or defining a method named 'foo'.
|
|
// x.foo();
|
|
// ^^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue41700b.dart:11:5: Error: The method 'foo' isn't defined for the class 'Null?'.
|
|
// - 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
// Try correcting the name to the name of an existing method, or defining a method named 'foo'.
|
|
// y.foo();
|
|
// ^^^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class Null extends core::Object {
|
|
synthetic constructor •() → self::Null
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method test() → dynamic {
|
|
self::Null x = let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:8:12: Error: The value 'null' can't be assigned to a variable of type 'Null' because 'Null' is not nullable.
|
|
- 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
Null x = null;
|
|
^" in null as{TypeError,ForNonNullableByDefault} self::Null;
|
|
invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:9:5: Error: The method 'foo' isn't defined for the class 'Null'.
|
|
- 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
Try correcting the name to the name of an existing method, or defining a method named 'foo'.
|
|
x.foo();
|
|
^^^";
|
|
self::Null? y = null;
|
|
invalid-expression "pkg/front_end/testcases/nnbd/issue41700b.dart:11:5: Error: The method 'foo' isn't defined for the class 'Null?'.
|
|
- 'Null' is from 'pkg/front_end/testcases/nnbd/issue41700b.dart'.
|
|
Try correcting the name to the name of an existing method, or defining a method named 'foo'.
|
|
y.foo();
|
|
^^^";
|
|
}
|
|
static method main() → dynamic {}
|