blob: f2b31bead24ab02366561e6db5d040d3f1b2e052 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Error: This requires the 'extension-methods' experiment to be enabled.
// Try enabling this experiment by adding it to the command line when compiling and running.
// extension A2 on A1 {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: A function declaration needs an explicit list of parameters.
// Try adding a parameter list to the function declaration.
// extension A2 on A1 {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:9:17: Error: 'A1' is already declared in this scope.
// extension A2 on A1 {
// ^^
// pkg/front_end/testcases/extensions/use_this.dart:7:7: Context: Previous declaration of 'A1'.
// class A1 {}
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:11: Error: A function declaration needs an explicit list of parameters.
// Try adding a parameter list to the function declaration.
// extension B2<T> on B1<T> {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Error: Expected '{' before this.
// extension B2<T> on B1<T> {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: A function declaration needs an explicit list of parameters.
// Try adding a parameter list to the function declaration.
// extension B2<T> on B1<T> {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:20: Error: 'B1' is already declared in this scope.
// extension B2<T> on B1<T> {
// ^^
// pkg/front_end/testcases/extensions/use_this.dart:20:7: Context: Previous declaration of 'B1'.
// class B1<T> {}
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: Type 'extension' not found.
// extension A2 on A1 {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:9:14: Warning: Type 'on' not found.
// extension A2 on A1 {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:1: Warning: Type 'extension' not found.
// extension B2<T> on B1<T> {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:22:17: Warning: Type 'on' not found.
// extension B2<T> on B1<T> {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:9:1: Warning: 'extension' isn't a type.
// extension A2 on A1 {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:10:3: Error: Can't use 'A1' because it is declared more than once.
// A1 method1() {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:11:12: Error: Expected identifier, but got 'this'.
// return this;
// ^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:14:3: Error: Can't use 'A1' because it is declared more than once.
// A1 method2<T>(T o) {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:16:12: Error: Expected identifier, but got 'this'.
// return this;
// ^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:23:3: Error: Can't use 'B1' because it is declared more than once.
// B1<T> method1() {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:24:12: Error: Expected identifier, but got 'this'.
// return this;
// ^^^^
//
// pkg/front_end/testcases/extensions/use_this.dart:27:3: Error: Can't use 'B1' because it is declared more than once.
// B1<T> method2<S>(S o) {
// ^^
//
// pkg/front_end/testcases/extensions/use_this.dart:29:12: Error: Expected identifier, but got 'this'.
// return this;
// ^^^^
//
import self as self;
import "dart:core" as core;
class A1 extends core::Object {
synthetic constructor •() self::A1*
: super core::Object::•()
;
}
class B1<T extends core::Object* = dynamic> extends core::Object {
synthetic constructor •() self::B1<self::B1::T*>*
: super core::Object::•()
;
}
static field invalid-type A2;
static method B2<T extends core::Object* = dynamic>() invalid-type {}
static method main() dynamic {}