| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:31:43: Error: The argument type 'Invocation' can't be assigned to the parameter type 'CustomInvocation'. |
| // - 'Invocation' is from 'dart:core'. |
| // - 'CustomInvocation' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| // String noSuchMethod1b = c1.noSuchMethod(invocation); // error |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:34:9: Error: The argument type 'String' can't be assigned to the parameter type 'Class?'. |
| // - 'Class' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| // c1 == ''; // error |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:42:32: Error: A value of type 'Type' can't be assigned to a variable of type 'CustomType'. |
| // - 'Type' is from 'dart:core'. |
| // - 'CustomType' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| // CustomType runtimeType2 = c2.runtimeType; // error |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:44:17: Error: 'runtimeType' isn't a function or method and can't be invoked. |
| // c2.runtimeType(); // error |
| // ^^^^^^^^^^^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:47:10: Error: A value of type 'dynamic Function(Invocation)' can't be assigned to a variable of type 'String Function(CustomInvocation)'. |
| // - 'Invocation' is from 'dart:core'. |
| // - 'CustomInvocation' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| // c2.noSuchMethod; // error |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:56:9: Error: The argument type 'String' can't be assigned to the parameter type 'Class?'. |
| // - 'Class' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| // c2 == ''; // ok or error? |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:59:53: Error: A value of type 'String Function()' can't be assigned to a variable of type 'String Function({Object o})'. |
| // - 'Object' is from 'dart:core'. |
| // String Function({Object o}) toStringTearOff2 = c2.toString; // error |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/nullable_object_access.dart:62:15: Error: No named parameter with the name 'o'. |
| // c2.toString(o: c1); // error |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| abstract class CustomType extends core::Type { |
| synthetic constructor •() → self::CustomType |
| : super core::Type::•() |
| ; |
| method call() → void {} |
| } |
| abstract class CustomInvocation extends core::Object implements core::Invocation { |
| synthetic constructor •() → self::CustomInvocation |
| : super core::Object::•() |
| ; |
| } |
| abstract class Class extends core::Object { |
| synthetic constructor •() → self::Class |
| : super core::Object::•() |
| ; |
| abstract get runtimeType() → self::CustomType; |
| forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String |
| return super.{core::Object::noSuchMethod}(invocation); |
| forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool |
| return super.{core::Object::==}(o); |
| abstract method toString({core::Object o = #C1}) → core::String; |
| } |
| static method main() → dynamic {} |
| static method test(self::Class c1, self::Class? c2, core::Invocation invocation, self::CustomInvocation customInvocation) → void { |
| self::CustomType runtimeType1 = c1.{self::Class::runtimeType}{self::CustomType}; |
| self::CustomType runtimeTypeVariable1 = c1.{self::Class::runtimeType}{self::CustomType}; |
| c1.{self::Class::runtimeType}{self::CustomType}.{self::CustomType::call}(){() → void}; |
| (self::CustomInvocation) → core::String noSuchMethodTearOff1 = c1.{self::Class::noSuchMethod}{(self::CustomInvocation) → core::String}; |
| (self::CustomInvocation) → core::String noSuchMethodTearOffVariable1 = c1.{self::Class::noSuchMethod}{(self::CustomInvocation) → core::String}; |
| core::String noSuchMethod1a = c1.{self::Class::noSuchMethod}(customInvocation){(self::CustomInvocation) → core::String}; |
| core::String noSuchMethod1b = c1.{self::Class::noSuchMethod}(let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:31:43: Error: The argument type 'Invocation' can't be assigned to the parameter type 'CustomInvocation'. |
| - 'Invocation' is from 'dart:core'. |
| - 'CustomInvocation' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| String noSuchMethod1b = c1.noSuchMethod(invocation); // error |
| ^" in invocation as{TypeError,ForNonNullableByDefault} self::CustomInvocation){(self::CustomInvocation) → core::String}; |
| core::String noSuchMethodVariable1 = c1.{self::Class::noSuchMethod}(customInvocation){(self::CustomInvocation) → core::String}; |
| c1 =={self::Class::==}{(self::Class) → core::bool} (let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:34:9: Error: The argument type 'String' can't be assigned to the parameter type 'Class?'. |
| - 'Class' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| c1 == ''; // error |
| ^" in "" as{TypeError,ForNonNullableByDefault} self::Class?); |
| c1 =={self::Class::==}{(self::Class) → core::bool} c2; |
| ({o: core::Object}) → core::String toStringTearOff1 = c1.{self::Class::toString}{({o: core::Object}) → core::String}; |
| ({o: core::Object}) → core::String toStringTearOffVariable1 = c1.{self::Class::toString}{({o: core::Object}) → core::String}; |
| c1.{self::Class::toString}(o: c1){({o: core::Object}) → core::String}; |
| self::CustomType runtimeType2 = let final Never #t3 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:42:32: Error: A value of type 'Type' can't be assigned to a variable of type 'CustomType'. |
| - 'Type' is from 'dart:core'. |
| - 'CustomType' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| CustomType runtimeType2 = c2.runtimeType; // error |
| ^" in c2.{core::Object::runtimeType}{core::Type} as{TypeError,ForNonNullableByDefault} self::CustomType; |
| core::Type runtimeTypeVariable2 = c2.{core::Object::runtimeType}{core::Type}; |
| invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:44:17: Error: 'runtimeType' isn't a function or method and can't be invoked. |
| c2.runtimeType(); // error |
| ^^^^^^^^^^^"; |
| (self::CustomInvocation) → core::String noSuchMethodTearOff2 = let final Never #t4 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:47:10: Error: A value of type 'dynamic Function(Invocation)' can't be assigned to a variable of type 'String Function(CustomInvocation)'. |
| - 'Invocation' is from 'dart:core'. |
| - 'CustomInvocation' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| c2.noSuchMethod; // error |
| ^" in c2.{core::Object::noSuchMethod}{(core::Invocation) → dynamic} as{TypeError,ForNonNullableByDefault} (self::CustomInvocation) → core::String; |
| (core::Invocation) → dynamic noSuchMethodTearOffVariable2 = c2.{core::Object::noSuchMethod}{(core::Invocation) → dynamic}; |
| core::int noSuchMethod2 = c2.{core::Object::noSuchMethod}(invocation){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| dynamic noSuchMethodVariable2 = c2.{core::Object::noSuchMethod}(invocation){(core::Invocation) → dynamic}; |
| c2 =={self::Class::==}{(self::Class) → core::bool} (let final Never #t5 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:56:9: Error: The argument type 'String' can't be assigned to the parameter type 'Class?'. |
| - 'Class' is from 'pkg/front_end/testcases/nnbd/nullable_object_access.dart'. |
| c2 == ''; // ok or error? |
| ^" in "" as{TypeError,ForNonNullableByDefault} self::Class?); |
| c2 =={self::Class::==}{(self::Class) → core::bool} c1; |
| ({o: core::Object}) → core::String toStringTearOff2 = let final Never #t6 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:59:53: Error: A value of type 'String Function()' can't be assigned to a variable of type 'String Function({Object o})'. |
| - 'Object' is from 'dart:core'. |
| String Function({Object o}) toStringTearOff2 = c2.toString; // error |
| ^" in c2.{core::Object::toString}{() → core::String} as{TypeError,ForNonNullableByDefault} ({o: core::Object}) → core::String; |
| () → core::String toStringTearOffVariable2 = c2.{core::Object::toString}{() → core::String}; |
| let final Never #t7 = invalid-expression "pkg/front_end/testcases/nnbd/nullable_object_access.dart:62:15: Error: No named parameter with the name 'o'. |
| c2.toString(o: c1); // error |
| ^" in c2.{core::Object::toString}{<inapplicable>}.(o: c1){({o: invalid-type}) → invalid-type}; |
| } |
| |
| constants { |
| #C1 = null |
| } |