blob: 39cfaf1411ebe30a3986febc7e59418f5e15d198 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/regress/invalid_this_reference_07.dart:7:7: Error: Extension types can't declare instance fields
// Try removing the field declaration or making it a static field
// var foo = this();
// ^^^
//
// pkg/front_end/testcases/regress/invalid_this_reference_07.dart:7:13: Error: Expected identifier, but got 'this'.
// var foo = this();
// ^^^^
//
// pkg/front_end/testcases/regress/invalid_this_reference_07.dart:17:13: Error: The method 'call' isn't defined for the type 'FooClass'.
// - 'FooClass' is from 'pkg/front_end/testcases/regress/invalid_this_reference_07.dart'.
// Try correcting the name to the name of an existing method, or defining a method named 'call'.
// var foo = this();
// ^
//
import self as self;
import "dart:core" as core;
class FooClass extends core::Object {
field dynamic foo = invalid-expression "pkg/front_end/testcases/regress/invalid_this_reference_07.dart:17:13: Error: The method 'call' isn't defined for the type 'FooClass'.
- 'FooClass' is from 'pkg/front_end/testcases/regress/invalid_this_reference_07.dart'.
Try correcting the name to the name of an existing method, or defining a method named 'call'.
var foo = this();
^" in this{<unresolved>}.call();
synthetic constructor •() self::FooClass
: super core::Object::•()
;
method bar() dynamic {
return this;
}
}
extension type Foo(dynamic d) {
abstract extension-type-member representation-field get d() dynamic;
get foo = self::Foo|get#foo;
set foo = self::Foo|set#foo;
method bar = self::Foo|bar;
method tearoff bar = self::Foo|get#bar;
constructor = self::Foo|constructor#;
constructor tearoff = self::Foo|constructor#_#new#tearOff;
}
static extension-type-member method Foo|constructor#(dynamic d) → self::Foo% /* erasure=dynamic, declared=! */ {
lowered final self::Foo% /* erasure=dynamic, declared=! */ #this = d;
return #this;
}
static extension-type-member synthetic method Foo|constructor#_#new#tearOff(dynamic d) → self::Foo% /* erasure=dynamic, declared=! */
return self::Foo|constructor#(d);
static abstract extension-type-member method Foo|get#foo(lowered dynamic #this) → invalid-type;
static abstract extension-type-member method Foo|set#foo(lowered dynamic #this, synthesized invalid-type #externalFieldValue) → void;
static extension-type-member method Foo|bar(lowered final self::Foo% /* erasure=dynamic, declared=! */ #this) → dynamic {
return #this;
}
static extension-type-member method Foo|get#bar(lowered final self::Foo% /* erasure=dynamic, declared=! */ #this) → () → dynamic
return () dynamic => self::Foo|bar(#this);