blob: 693f2b4f236f4a816b60b868e374bd1b194f0e51 [file] [log] [blame] [edit]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/issue43218.dart:24:10: Error: Setter not found: 'id'.
// Ext(c).id++;
// ^^
//
import self as self;
import "dart:core" as core;
class C extends core::Object {
field core::int value;
constructor •() self::C
: self::C::value = 0, super core::Object::•() {}
method init() dynamic {
this.{self::C::value} = 0;
}
get id() core::int
return this.{self::C::value}{core::int};
set id(core::int v) void {
this.{self::C::value} = v;
}
}
extension Ext on self::C {
get id = self::Ext|get#id;
}
static extension-member method Ext|get#id(lowered final self::C #this) → core::int
return #this.{self::C::value}{core::int}.{core::num::+}(1){(core::num) → core::int};
static method test() dynamic {
self::C c = new self::C::•();
invalid-expression "pkg/front_end/testcases/extensions/issue43218.dart:24:10: Error: Setter not found: 'id'.
Ext(c).id++;
^^";
}
static method main() dynamic {}