blob: 26ca627f1c408407cd87a6178ba4ee47a9b724e3 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.field;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.field = 42;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.method;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.method();
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.field!.toString();
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c!.method()!.toString();
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c! + c;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c! + c!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c! + c!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// c + c!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null.
// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'.
// (c + c)!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !o! ? !o! : !!o!!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !o! ? !o! : !!o!!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !o! ? !o! : !!o!!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !(o!) ? (!o)! : (!(!o)!)!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !(o!) ? (!o)! : (!(!o)!)!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !(o!) ? (!o)! : (!(!o)!)!;
// ^
//
// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
// !(o!) ? (!o)! : (!(!o)!)!;
// ^
//
import self as self;
import "dart:core" as core;
class Class extends core::Object {
field core::int? field = null;
synthetic constructor •() self::Class
: super core::Object::•()
;
method method() core::int?
return this.{self::Class::field};
operator +(self::Class other) self::Class
return new self::Class::•();
}
static method main() dynamic {
self::Class? c = new self::Class::•();
c!;
c{self::Class}!.{self::Class::field};
c{self::Class}!.{self::Class::field} = 42;
c{self::Class}!.{self::Class::method};
c{self::Class}!.{self::Class::method}();
c{self::Class}!.{self::Class::field}!.{core::int::toString}();
c{self::Class}!.{self::Class::method}()!.{core::int::toString}();
c{self::Class}!.{self::Class::+}(c{self::Class});
c{self::Class}!.{self::Class::+}(c{self::Class}!);
c{self::Class}.{self::Class::+}(c{self::Class}!);
c{self::Class}.{self::Class::+}(c{self::Class})!;
core::bool? o = true;
!o! ?{core::bool} !o{core::bool}! : !!o{core::bool}!!;
!o{core::bool}! ?{core::bool} (!o{core::bool})! : (!(!o{core::bool})!)!;
}