blob: 207f18fae6fe27ed9e613d182a6fe35507c571fc [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/extension_types/simple_method_resolution.dart:16:5: Error: The method 'foo' isn't defined for the extension 'E'.
// Try correcting the name to the name of an existing method, or defining a method name 'foo'.
// e.foo(); // Error.
// ^^^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
method foo() void {}
}
extension E on self::A {
method bar = self::E|bar;
tearoff bar = self::E|get#bar;
}
static method E|bar(lowered final self::A #this) → void
return #this.{self::A::foo}();
static method E|get#bar(lowered final self::A #this) → () → void
return () void => self::E|bar(#this);
static method test(self::A a, self::E e) dynamic {
a.{self::A::foo}();
self::E|bar(a);
invalid-expression "pkg/front_end/testcases/extension_types/simple_method_resolution.dart:16:5: Error: The method 'foo' isn't defined for the extension 'E'.
Try correcting the name to the name of an existing method, or defining a method name 'foo'.
e.foo(); // Error.
^^^";
self::E|bar(e);
}
static method main() dynamic {}