blob: 9d6b12e64120785362615ed40fe92c70edafeec1 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/issue44003.dart:14:8: Error: 'foo' is already declared in this scope.
// void foo(String baz, int a) {
// ^^^
// pkg/front_end/testcases/extensions/issue44003.dart:10:8: Context: Previous declaration of 'foo'.
// void foo(String bar) {
// ^^^
//
// pkg/front_end/testcases/extensions/issue44003.dart:6:8: Error: The method 'foo' isn't defined for the class 'List<String>'.
// - 'List' is from 'dart:core'.
// Try correcting the name to the name of an existing method, or defining a method named 'foo'.
// args.foo('1', 2);
// ^^^
//
import self as self;
import "dart:core" as core;
extension _extension#0 on core::List<core::String> {
method foo = self::_extension#0|foo;
tearoff foo = self::_extension#0|get#foo;
}
static method test(core::List<core::String> args) void {
invalid-expression "pkg/front_end/testcases/extensions/issue44003.dart:6:8: Error: The method 'foo' isn't defined for the class 'List<String>'.
- 'List' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'foo'.
args.foo('1', 2);
^^^" in args{<unresolved>}.foo("1", 2);
}
static method _extension#0|foo(lowered final core::List<core::String> #this, core::String bar) → void {
core::print(1);
}
static method _extension#0|get#foo(lowered final core::List<core::String> #this) → (core::String) → void
return (core::String bar) void => self::_extension#0|foo(#this, bar);
static method main() dynamic {}