blob: 1ce4b8237ab8d959cc5f833e21bb15979d563f75 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:26:3: Error: Getter not found: 'et'.
// et.foo = 42; // Error.
// ^^
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:27:3: Error: Getter not found: 'et'.
// et.bar = 42; // Error.
// ^^
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:28:3: Error: Getter not found: 'et'.
// et.baz = 42; // Ok.
// ^^
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:20:5: Error: The setter 'baz' isn't defined for the class 'A'.
// - 'A' is from 'pkg/front_end/testcases/extension_types/simple_setter_resolution.dart'.
// Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
// a.baz = 42; // Error.
// ^^^
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:22:5: Error: The setter 'foo' isn't defined for the extension 'E'.
// Try correcting the name to the name of an existing setter, or defining a setter or field named 'foo'.
// e.foo = 42; // Error.
// ^^^
//
// pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:24:5: Error: The setter 'baz' isn't defined for the extension 'E'.
// Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
// e.baz = 42; // Error.
// ^^^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
set foo(core::int value) void {}
}
extension E on self::A {
set bar = self::E|set#bar;
}
extension type ET on self::A {
set baz = self::ET|set#baz;
}
static method E|set#bar(lowered final self::A #this, core::int value) → void {}
static method ET|set#baz(lowered final self::A #this, core::int value) → void {}
static method test(self::A a, self::E e) dynamic {
a.{self::A::foo} = 42;
self::E|set#bar(a, 42);
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:20:5: Error: The setter 'baz' isn't defined for the class 'A'.
- 'A' is from 'pkg/front_end/testcases/extension_types/simple_setter_resolution.dart'.
Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
a.baz = 42; // Error.
^^^";
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:22:5: Error: The setter 'foo' isn't defined for the extension 'E'.
Try correcting the name to the name of an existing setter, or defining a setter or field named 'foo'.
e.foo = 42; // Error.
^^^";
self::E|set#bar(e, 42);
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:24:5: Error: The setter 'baz' isn't defined for the extension 'E'.
Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
e.baz = 42; // Error.
^^^";
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:26:3: Error: Getter not found: 'et'.
et.foo = 42; // Error.
^^"{dynamic}.foo = 42;
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:27:3: Error: Getter not found: 'et'.
et.bar = 42; // Error.
^^"{dynamic}.bar = 42;
invalid-expression "pkg/front_end/testcases/extension_types/simple_setter_resolution.dart:28:3: Error: Getter not found: 'et'.
et.baz = 42; // Ok.
^^"{dynamic}.baz = 42;
}
static method main() dynamic {}