blob: 4f9e4bae86c40b3966df67147ecb77aaa0cfb536 [file] [log] [blame]
library opted_out_lib;
import self as self;
import "dart:core" as core;
import "issue41498b_lib.dart" as iss;
import "org-dartlang-testcase:///issue41498b_lib.dart" as opt_in;
typedef LegacyFoo = () →* void;
class C extends core::Object {
synthetic constructor •() self::C*
: super core::Object::•()
;
static method test() void {
() →* void f;
f.{core::Object::toString}(){() →* core::String*};
}
method test2() void {
() →* void f;
f.{core::Object::toString}(){() →* core::String*};
}
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
static method test() dynamic {
() →* void f;
f.{core::Object::toString}(){() →* core::String*};
core::Function* foo = () Null {
() →* void f;
f.{core::Object::toString}(){() →* core::String*};
};
self::C::test();
new self::C::•().{self::C::test2}(){() →* void};
}
static method main() dynamic {
iss::main();
}
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:11:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
// f.toString(); // error
// ^
//
// pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:17:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
// f.toString(); // error
// ^
//
// pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:24:3: Error: Non-nullable variable 'f' must be assigned before it can be used.
// f.toString(); // error
// ^
//
// pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:29:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
// f.toString(); // error
// ^
//
import self as iss;
import "dart:core" as core;
import "org-dartlang-testcase:///issue41498b.dart";
class C extends core::Object {
synthetic constructor •() iss::C
: super core::Object::•()
;
static method test() void {
() void f;
(let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:11:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
f.toString(); // error
^" in f).{core::Object::toString}(){() → core::String};
}
method test2() → void {
() → void f;
(let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:17:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
f.toString(); // error
^" in f).{core::Object::toString}(){() → core::String};
}
}
static method test() → dynamic {
() → void f;
(let final Never #t3 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:24:3: Error: Non-nullable variable 'f' must be assigned before it can be used.
f.toString(); // error
^" in f).{core::Object::toString}(){() → core::String};
core::Function foo = () → Null {
() → void f;
(let final Never #t4 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue41498b_lib.dart:29:5: Error: Non-nullable variable 'f' must be assigned before it can be used.
f.toString(); // error
^" in f).{core::Object::toString}(){() → core::String};
};
iss::C::test();
new iss::C::•().{iss::C::test2}(){() → void};
}
static method main() → dynamic {}