| library test /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:22: Error: A value of type 'int' can't be assigned to a variable of type 'A'. |
| // - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| // (/*@target=A.+*/ ++new /*@type=B*/ B(). /*@target=B.a*/ /*@target=B.a*/ a); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:22: Error: A value of type 'double' can't be assigned to a variable of type 'A'. |
| // - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| // (/*@target=A.-*/ --new /*@type=B*/ B(). /*@target=B.a*/ /*@target=B.a*/ a); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:23:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'. |
| // - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| // /*@type=int*/ a /*@target=A.+*/ ++); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:26:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'. |
| // - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| // /*@type=double*/ a /*@target=A.-*/ --); |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| operator +(dynamic other) → core::int |
| return 1; |
| operator -(dynamic other) → core::double |
| return 2.0; |
| } |
| class B extends core::Object { |
| field self::A a = throw ""; |
| synthetic constructor •() → self::B |
| : super core::Object::•() |
| ; |
| } |
| static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:22: Error: A value of type 'int' can't be assigned to a variable of type 'A'. |
| - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| (/*@target=A.+*/ ++new /*@type=B*/ B(). /*@target=B.a*/ /*@target=B.a*/ a); |
| ^" in #t1.{self::B::a}{self::A}.{self::A::+}(1){(dynamic) → core::int} as{TypeError,ForNonNullableByDefault} self::A; |
| static field core::double v_prefix_mm = let final self::B #t2 = new self::B::•() in #t2.{self::B::a} = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:22: Error: A value of type 'double' can't be assigned to a variable of type 'A'. |
| - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| (/*@target=A.-*/ --new /*@type=B*/ B(). /*@target=B.a*/ /*@target=B.a*/ a); |
| ^" in #t2.{self::B::a}{self::A}.{self::A::-}(1){(dynamic) → core::double} as{TypeError,ForNonNullableByDefault} self::A; |
| static field self::A v_postfix_pp = let final self::B #t3 = new self::B::•() in let final self::A #t4 = #t3.{self::B::a}{self::A} in let final core::int #t5 = #t3.{self::B::a} = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:23:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'. |
| - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| /*@type=int*/ a /*@target=A.+*/ ++); |
| ^" in #t4.{self::A::+}(1){(dynamic) → core::int} as{TypeError,ForNonNullableByDefault} self::A in #t4; |
| static field self::A v_postfix_mm = let final self::B #t6 = new self::B::•() in let final self::A #t7 = #t6.{self::B::a}{self::A} in let final core::double #t8 = #t6.{self::B::a} = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:26:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'. |
| - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'. |
| /*@type=double*/ a /*@target=A.-*/ --); |
| ^" in #t7.{self::A::-}(1){(dynamic) → core::double} as{TypeError,ForNonNullableByDefault} self::A in #t7; |
| static method main() → dynamic {} |