blob: abb923261d9399d2d52a06ffaa027e613df51331 [file] [log] [blame] [edit]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/issue44844.dart:7:8: Error: 'foo' is already declared in this scope.
// void foo() {}
// ^^^
// pkg/front_end/testcases/extensions/issue44844.dart:6:14: Context: Previous declaration of 'foo'.
// static int foo = 2;
// ^^^
//
// pkg/front_end/testcases/extensions/issue44844.dart:11:5: Error: The method 'foo' isn't defined for the type 'int'.
// Try correcting the name to the name of an existing method, or defining a method named 'foo'.
// 3.foo();
// ^^^
//
import self as self;
import "dart:core" as core;
extension /* unnamed */ _extension#0 on core::int {
static field foo = self::_extension#0|foo;
}
static field core::int _extension#0|foo = 2;
static method test() void {
invalid-expression "pkg/front_end/testcases/extensions/issue44844.dart:11:5: Error: The method 'foo' isn't defined for the type 'int'.
Try correcting the name to the name of an existing method, or defining a method named 'foo'.
3.foo();
^^^" in 3{<unresolved>}.foo();
}
static method main() dynamic {}