| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.m1; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.m1 = 42; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.method(); |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property.m1; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property.method(); |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0]; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0] = 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0] ??= 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0]; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0] = 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0] ??= 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.m1 ??= 42; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.m2 += 2; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.m2++; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // --this?.m2; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. |
| // - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. |
| // this ?? new C(); |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0]; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0] = 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?[0] += 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0]; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0] = 0; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. |
| // Try replacing '?.' with '.' |
| // this?.property[0] += 0; |
| // ^^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class C extends core::Object { |
| field core::int? m1 = null; |
| field core::int m2 = 0; |
| synthetic constructor •() → self::C |
| : super core::Object::•() |
| ; |
| get property() → self::C |
| return this; |
| method test() → dynamic { |
| this.{self::C::m1}{core::int?}; |
| this.{self::C::m1} = 42; |
| this.{self::C::method}(){() → dynamic}; |
| this.{self::C::property}{self::C}.{self::C::m1}{core::int?}; |
| this.{self::C::property}{self::C}.{self::C::method}(){() → dynamic}; |
| this.{self::C::[]}(0){(core::int) → core::int?}; |
| this.{self::C::[]=}(0, 0){(core::int, core::int) → void}; |
| let final core::int #t1 = 0 in this.{self::C::[]}(#t1){(core::int) → core::int?} == null ?{core::int} this.{self::C::[]=}(#t1, 0){(core::int, core::int) → void} : null; |
| this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; |
| this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; |
| let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; |
| this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; |
| this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; |
| this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; |
| this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; |
| this; |
| } |
| operator [](core::int index) → core::int? |
| return 0; |
| operator []=(core::int index, core::int value) → void {} |
| method method() → dynamic {} |
| } |
| class D extends core::Object { |
| synthetic constructor •() → self::D |
| : super core::Object::•() |
| ; |
| get property() → self::D |
| return this; |
| method test() → dynamic { |
| this.{self::D::[]}(0){(core::int) → core::int}; |
| this.{self::D::[]=}(0, 0){(core::int, core::int) → void}; |
| let final core::int #t4 = 0 in this.{self::D::[]=}(#t4, this.{self::D::[]}(#t4){(core::int) → core::int}.{core::num::+}(0){(core::num) → core::int}){(core::int, core::int) → void}; |
| this.{self::D::property}{self::D}.{self::D::[]}(0){(core::int) → core::int}; |
| this.{self::D::property}{self::D}.{self::D::[]=}(0, 0){(core::int, core::int) → void}; |
| let final self::D #t5 = this.{self::D::property}{self::D} in let final core::int #t6 = 0 in #t5.{self::D::[]=}(#t6, #t5.{self::D::[]}(#t6){(core::int) → core::int}.{core::num::+}(0){(core::num) → core::int}){(core::int, core::int) → void}; |
| } |
| operator [](core::int index) → core::int |
| return 0; |
| operator []=(core::int index, core::int value) → void {} |
| } |
| static method main() → dynamic { |
| new self::C::•().{self::C::test}(){() → dynamic}; |
| new self::D::•().{self::D::test}(){() → dynamic}; |
| } |
| |
| |
| Extra constant evaluation status: |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:19:11 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:19:11 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:22:20 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:22:20 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:43:11 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:43:11 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:46:20 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///null_aware_this_access.dart:46:20 -> IntConstant(0) |
| Extra constant evaluation: evaluated: 100, effectively constant: 8 |