blob: 9c74d0a555b6f08cdb372d3300927dde037e1c9c [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/regress/invalid_this_reference_08.dart:7:7: Error: Extensions 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_08.dart:7:13: Error: Expected identifier, but got 'this'.
// var foo = this();
// ^^^^
//
import self as self;
extension Foo on dynamic {
field foo = self::Foo|foo;
method bar = self::Foo|bar;
method tearoff bar = self::Foo|get#bar;
}
static field invalid-type Foo|foo = invalid-expression "pkg/front_end/testcases/regress/invalid_this_reference_08.dart:7:13: Error: Expected identifier, but got 'this'.
var foo = this();
^^^^";
static extension-member method Foo|bar(lowered final dynamic #this) → dynamic {
return #this;
}
static extension-member method Foo|get#bar(lowered final dynamic #this) → () → dynamic
return () dynamic => self::Foo|bar(#this);