blob: b35bfc66fef3b3072bd796c1c709714bab8820da [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/other_kinds.dart:18: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/other_kinds.dart:18: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/other_kinds.dart:18:17: Error: 'A1' is already declared in this scope.
// extension A2 on A1 {
// ^^
// pkg/front_end/testcases/extensions/other_kinds.dart:5:7: Context: Previous declaration of 'A1'.
// class A1 {
// ^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: Type 'extension' not found.
// extension A2 on A1 {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:18:14: Warning: Type 'on' not found.
// extension A2 on A1 {
// ^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:18:1: Warning: 'extension' isn't a type.
// extension A2 on A1 {
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Error: Expected ';' after this.
// int get instanceProperty => getInstanceField();
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:19:28: Error: A function declaration needs an explicit list of parameters.
// Try adding a parameter list to the function declaration.
// int get instanceProperty => getInstanceField();
// ^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:19:31: Warning: Method not found: 'getInstanceField'.
// int get instanceProperty => getInstanceField();
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Error: Expected ';' after this.
// void set instanceProperty(int value) {
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:21:12: Error: 'instanceProperty' is already declared in this scope.
// void set instanceProperty(int value) {
// ^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/extensions/other_kinds.dart:19:11: Context: Previous declaration of 'instanceProperty'.
// int get instanceProperty => getInstanceField();
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:22:5: Warning: Method not found: 'setInstanceField'.
// setInstanceField(value);
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:27:7: Error: Expected ';' after this.
// int operator +(int value) {
// ^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:27:16: Error: '+' is not a prefix operator.
// Try removing '+'.
// int operator +(int value) {
// ^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:28:12: Warning: Method not found: 'getInstanceField'.
// return getInstanceField() + value;
// ^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:29:3: Error: Expected ';' after this.
// }
// ^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:31:3: Error: Can't have modifier 'static' here.
// Try removing 'static'.
// static int staticField = A1.getStaticField();
// ^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:31:28: Error: Can't use 'A1' because it is declared more than once.
// static int staticField = A1.getStaticField();
// ^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:33:3: Error: Can't have modifier 'static' here.
// Try removing 'static'.
// static int get staticProperty => A1.getStaticField();
// ^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: 'get' is already declared in this scope.
// static int get staticProperty => A1.getStaticField();
// ^^^
// pkg/front_end/testcases/extensions/other_kinds.dart:19:7: Context: Previous declaration of 'get'.
// int get instanceProperty => getInstanceField();
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:33:14: Error: Expected ';' after this.
// static int get staticProperty => A1.getStaticField();
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:33:33: Error: A function declaration needs an explicit list of parameters.
// Try adding a parameter list to the function declaration.
// static int get staticProperty => A1.getStaticField();
// ^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:33:36: Error: Can't use 'A1' because it is declared more than once.
// static int get staticProperty => A1.getStaticField();
// ^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:35:3: Error: Can't have modifier 'static' here.
// Try removing 'static'.
// static void set staticProperty(int value) {
// ^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: 'set' is already declared in this scope.
// static void set staticProperty(int value) {
// ^^^
// pkg/front_end/testcases/extensions/other_kinds.dart:21:8: Context: Previous declaration of 'set'.
// void set instanceProperty(int value) {
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:35:15: Error: Expected ';' after this.
// static void set staticProperty(int value) {
// ^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:35:19: Error: 'staticProperty' is already declared in this scope.
// static void set staticProperty(int value) {
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/extensions/other_kinds.dart:33:18: Context: Previous declaration of 'staticProperty'.
// static int get staticProperty => A1.getStaticField();
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/extensions/other_kinds.dart:36:5: Error: Can't use 'A1' because it is declared more than once.
// A1.setStaticField(value);
// ^
//
import self as self;
import "dart:core" as core;
class A1 extends core::Object {
field core::int* _instanceField = null;
static field core::int* _staticField = 0;
synthetic constructor •() self::A1*
: super core::Object::•()
;
method getInstanceField() core::int*
return this.{self::A1::_instanceField};
method setInstanceField(core::int* value) void {
this.{self::A1::_instanceField} = value;
}
static method getStaticField() core::int*
return self::A1::_staticField;
static method setStaticField(core::int* value) void {
self::A1::_staticField = value;
}
}
static field invalid-type A2;
static method main() dynamic {}