blob: 14adf3305173b5c6d8aa309222e9c1e9a481efc9 [file] [log] [blame]
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<BottomType> #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 let Null #t2 = null in #t2.==(null) ?{self::Null} #t2 as{TypeError,ForNonNullableByDefault} self::Null : #t2{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 {}
Extra constant evaluation status:
Evaluated: MethodInvocation @ org-dartlang-testcase:///issue41700b.dart:8:12 -> BoolConstant(true)
Evaluated: VariableGet @ org-dartlang-testcase:///issue41700b.dart:8:12 -> NullConstant(null)
Evaluated: VariableGet @ org-dartlang-testcase:///issue41700b.dart:8:12 -> NullConstant(null)
Extra constant evaluation: evaluated: 7, effectively constant: 3