blob: af5674246e34667a321c2595c725cb5c8f27c69e [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/dynamic_methods.dart:16:46: Error: 'hashCode' isn't a function or method and can't be invoked.
// d. /*@target=Object.hashCode*/ hashCode();
// ^^^^...
//
import self as self;
import "dart:core" as core;
class Foo extends core::Object {
synthetic constructor •() self::Foo*
: super core::Object::•()
;
method foo(core::int* x) core::int*
return x;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
static method test() dynamic {
dynamic d = new self::Foo::•();
core::int* get_hashCode = d.{core::Object::hashCode};
dynamic call_hashCode = invalid-expression "pkg/front_end/testcases/inference/dynamic_methods.dart:16:46: Error: 'hashCode' isn't a function or method and can't be invoked.
d. /*@target=Object.hashCode*/ hashCode();
^^^^...";
core::String* call_toString = d.{core::Object::toString}();
dynamic call_toStringArg = d.toString(color: "pink");
dynamic call_foo0 = d.foo();
dynamic call_foo1 = d.foo(1);
dynamic call_foo2 = d.foo(1, 2);
dynamic call_nsm0 = d.noSuchMethod();
dynamic call_nsm1 = d.{core::Object::noSuchMethod}(null);
dynamic call_nsm2 = d.noSuchMethod(null, null);
core::bool* equals_self = d.{core::Object::==}(d);
core::bool* equals_null = d.{core::Object::==}(null);
core::bool* null_equals = null.{core::Object::==}(d);
core::bool* not_equals_self = !d.{core::Object::==}(d);
core::bool* not_equals_null = !d.{core::Object::==}(null);
core::bool* null_not_equals = !null.{core::Object::==}(d);
}
static method main() dynamic {}