| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/none/operator.dart:48:10: Error: The operator '-' isn't defined for the class 'String'. |
| // Try correcting the operator to an existing operator, or defining a '-' operator. |
| // string - 42; |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:66:12: Error: Too few positional arguments: 1 required, 0 given. |
| // -c.method(); |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:69:3: Error: The operator 'unary-' isn't defined for the class 'String'. |
| // Try correcting the operator to an existing operator, or defining a 'unary-' operator. |
| // -string; |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:86:11: Error: Too few positional arguments: 1 required, 0 given. |
| // c.method()[0]; |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:109:3: Error: Undefined name 'string'. |
| // string[0] = 42; |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:106:11: Error: Too few positional arguments: 1 required, 0 given. |
| // c.method()[0] = 42; |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:129:3: Error: Undefined name 'string'. |
| // string[0] += 42; |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:116:14: Error: Operator '+' cannot be called on 'double?' because it is potentially null. |
| // map['foo'] += 0.5; |
| // ^ |
| // |
| // pkg/front_end/testcases/none/operator.dart:126:11: Error: Too few positional arguments: 1 required, 0 given. |
| // c.method()[0] += 42; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| |
| class Class<T extends core::Object? = dynamic> extends core::Object { |
| synthetic constructor •() → self::Class<self::Class::T%> |
| : super core::Object::•() |
| ; |
| operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%> |
| return other; |
| operator unary-() → self::Class<self::Class::T%> |
| return this; |
| operator [](core::int index) → self::Class<self::Class::T%> |
| return this; |
| operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void {} |
| method method(core::double o) → core::int |
| return 42; |
| } |
| static method add(core::num n, core::int i, core::double d, self::Class<core::String> c, dynamic dyn, Never never, core::String string) → dynamic { |
| core::print("InstanceInvocation"); |
| n.{core::num::+}(n){(core::num) → core::num}; |
| n.{core::num::+}(i){(core::num) → core::num}; |
| n.{core::num::+}(d){(core::num) → core::double}; |
| n.{core::num::+}(dyn as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num}; |
| core::print("InstanceInvocation"); |
| i.{core::num::+}(n){(core::num) → core::num}; |
| i.{core::num::+}(i){(core::num) → core::int}; |
| i.{core::num::+}(d){(core::num) → core::double}; |
| i.{core::num::+}(dyn as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num}; |
| core::print("InstanceInvocation"); |
| d.{core::double::+}(n){(core::num) → core::double}; |
| d.{core::double::+}(i){(core::num) → core::double}; |
| d.{core::double::+}(d){(core::num) → core::double}; |
| i.{core::num::+}(dyn as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num}; |
| core::print("InstanceInvocation"); |
| c.{self::Class::+}(c){(self::Class<core::String>) → self::Class<core::String>}; |
| c.{self::Class::+}(dyn as{TypeError,ForDynamic,ForNonNullableByDefault} self::Class<core::String>){(self::Class<core::String>) → self::Class<core::String>}; |
| core::print("DynamicInvocation"); |
| dyn{dynamic}.+(n); |
| core::print("DynamicInvocation (Never)"); |
| let final Never #t1 = (let final Never #t2 = never in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){Never}.+(n) in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| core::print("DynamicInvocation (Invalid)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:48:10: Error: The operator '-' isn't defined for the class 'String'. |
| Try correcting the operator to an existing operator, or defining a '-' operator. |
| string - 42; |
| ^" in string{<unresolved>}.-(42); |
| } |
| static method unaryMinus(core::num n, core::int i, core::double d, self::Class<core::String> c, dynamic dyn, Never never, core::String string) → dynamic { |
| core::print("InstanceInvocation"); |
| n.{core::num::unary-}(){() → core::num}; |
| i.{core::int::unary-}(){() → core::int}; |
| d.{core::double::unary-}(){() → core::double}; |
| c.{self::Class::unary-}(){() → self::Class<core::String>}; |
| core::print("DynamicInvocation"); |
| dyn{dynamic}.unary-(); |
| core::print("DynamicInvocation (Never)"); |
| let final Never #t3 = (let final Never #t4 = never in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){Never}.unary-() in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| core::print("DynamicInvocation (Invalid)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:66:12: Error: Too few positional arguments: 1 required, 0 given. |
| -c.method(); |
| ^" in c.{self::Class::method}{<inapplicable>}.(){() → invalid-type}{<invalid>}.unary-(); |
| core::print("DynamicInvocation (Unresolved)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:69:3: Error: The operator 'unary-' isn't defined for the class 'String'. |
| Try correcting the operator to an existing operator, or defining a 'unary-' operator. |
| -string; |
| ^" in string{<unresolved>}.unary-(); |
| } |
| static method indexGet(core::List<core::int> list, core::Map<core::String, core::double> map, self::Class<core::String> c, dynamic dyn, Never never, core::String string) → dynamic { |
| core::print("InstanceInvocation"); |
| list.{core::List::[]}(0){(core::int) → core::int}; |
| map.{core::Map::[]}("foo"){(core::Object?) → core::double?}; |
| c.{self::Class::[]}(0){(core::int) → self::Class<core::String>}; |
| core::print("DynamicInvocation"); |
| dyn{dynamic}.[](0); |
| core::print("DynamicInvocation (Never)"); |
| let final Never #t5 = (let final Never #t6 = never in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){Never}.[](0) in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| core::print("DynamicInvocation (Invalid)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:86:11: Error: Too few positional arguments: 1 required, 0 given. |
| c.method()[0]; |
| ^" in c.{self::Class::method}{<inapplicable>}.(){() → invalid-type}{<invalid>}.[](0); |
| core::print("DynamicInvocation (Unresolved)"); |
| string.{core::String::[]}(0){(core::int) → core::String}; |
| } |
| static method indexSet(core::List<core::int> list, core::Map<core::String, core::double> map, self::Class<core::String> c, dynamic dyn, Never never) → dynamic { |
| core::print("InstanceInvocation"); |
| list.{core::List::[]=}(0, 42){(core::int, core::int) → void}; |
| map.{core::Map::[]=}("foo", 0.5){(core::String, core::double) → void}; |
| c.{self::Class::[]=}(0, c){(core::int, self::Class<core::String>) → void}; |
| core::print("DynamicInvocation"); |
| dyn{dynamic}.[]=(0, 42); |
| core::print("DynamicInvocation (Never)"); |
| (let final Never #t7 = never in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){Never}.[]=(0, 42); |
| core::print("DynamicInvocation (Invalid)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:106:11: Error: Too few positional arguments: 1 required, 0 given. |
| c.method()[0] = 42; |
| ^" in c.{self::Class::method}{<inapplicable>}.(){() → invalid-type}{<invalid>}.[]=(0, 42); |
| core::print("DynamicInvocation (Unresolved)"); |
| invalid-expression "pkg/front_end/testcases/none/operator.dart:109:3: Error: Undefined name 'string'. |
| string[0] = 42; |
| ^^^^^^"{<invalid>}.[]=(0, 42); |
| } |
| static method compound(core::List<core::int> list, core::Map<core::String, core::double> map, self::Class<core::String> c, dynamic dyn, Never never) → dynamic { |
| core::print("InstanceInvocation"); |
| let final core::List<core::int> #t8 = list in let final core::int #t9 = 0 in #t8.{core::List::[]=}(#t9, #t8.{core::List::[]}(#t9){(core::int) → core::int}.{core::num::+}(42){(core::num) → core::int}){(core::int, core::int) → void}; |
| let final core::Map<core::String, core::double> #t10 = map in let final core::String #t11 = "foo" in #t10.{core::Map::[]=}(#t11, invalid-expression "pkg/front_end/testcases/none/operator.dart:116:14: Error: Operator '+' cannot be called on 'double?' because it is potentially null. |
| map['foo'] += 0.5; |
| ^" in #t10.{core::Map::[]}(#t11){(core::Object?) → core::double?}.{core::double::+}(0.5){(core::num) → core::double}){(core::String, core::double) → void}; |
| let final self::Class<core::String> #t12 = c in let final core::int #t13 = 0 in #t12.{self::Class::[]=}(#t13, #t12.{self::Class::[]}(#t13){(core::int) → self::Class<core::String>}.{self::Class::+}(c){(self::Class<core::String>) → self::Class<core::String>}){(core::int, self::Class<core::String>) → void}; |
| core::print("DynamicInvocation"); |
| let final dynamic #t14 = dyn in let final core::int #t15 = 0 in #t14{dynamic}.[]=(#t15, #t14{dynamic}.[](#t15){dynamic}.+(42)); |
| core::print("DynamicInvocation (Never)"); |
| let final Never #t16 = let final Never #t17 = let final Never #t18 = never in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.") in let final core::int #t19 = 0 in #t17{Never}.[]=(#t19, #t17{Never}.[](#t19){Never}.+(42)) in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); |
| core::print("DynamicInvocation (Invalid)"); |
| let final invalid-type #t20 = invalid-expression "pkg/front_end/testcases/none/operator.dart:126:11: Error: Too few positional arguments: 1 required, 0 given. |
| c.method()[0] += 42; |
| ^" in c.{self::Class::method}{<inapplicable>}.(){() → invalid-type} in let final core::int #t21 = 0 in #t20{<invalid>}.[]=(#t21, #t20{<invalid>}.[](#t21){<invalid>}.+(42)); |
| core::print("DynamicInvocation (Unresolved)"); |
| let final invalid-type #t22 = invalid-expression "pkg/front_end/testcases/none/operator.dart:129:3: Error: Undefined name 'string'. |
| string[0] += 42; |
| ^^^^^^" in let final core::int #t23 = 0 in #t22{<invalid>}.[]=(#t23, #t22{<invalid>}.[](#t23){<invalid>}.+(42)); |
| } |
| static method main() → dynamic {} |