| library; | |
| // | |
| // Problems in library: | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:16: Error: Expected an identifier, but got 'new'. | |
| // Try inserting an identifier before 'new'. | |
| // Foo() : this.new = 42; | |
| // ^^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:11: Error: Expected an assignment after the field name. | |
| // To initialize a field, use the syntax 'name = value'. | |
| // Foo() : this.new = 42; | |
| // ^^^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:16: Error: Expected '{' before this. | |
| // Foo() : this.new = 42; | |
| // ^^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:16: Error: A method declaration needs an explicit list of parameters. | |
| // Try adding a parameter list to the method declaration. | |
| // Foo() : this.new = 42; | |
| // ^^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:20: Error: Only factory constructor can specify '=' redirection. | |
| // Try making this a factory constructor, or remove the redirection. | |
| // Foo() : this.new = 42; | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:22: Error: Expected an identifier, but got '42'. | |
| // Try inserting an identifier before '42'. | |
| // Foo() : this.new = 42; | |
| // ^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:20: Error: Expected ';' after this. | |
| // Foo() : this.new = 42; | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:22: Error: Expected a class member, but got '42'. | |
| // Foo() : this.new = 42; | |
| // ^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:24: Error: Expected a class member, but got ';'. | |
| // Foo() : this.new = 42; | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:16: Error: 'Foo' is already declared in this scope. | |
| // Foo() : this.new = 42; | |
| // ^^^ | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:3: Context: Previous declaration of 'Foo'. | |
| // Foo() : this.new = 42; | |
| // ^^^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:20: Error: Expected a function body or '=>'. | |
| // Try adding {}. | |
| // Foo() : this.new = 42; | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:22: Error: Constructors can't have a return type. | |
| // Try removing the return type. | |
| // Foo() : this.new = 42; | |
| // ^ | |
| // | |
| import self as self; | |
| import "dart:core" as core; | |
| class Foo extends core::Object { | |
| constructor •() → self::Foo | |
| : invalid-initializer "pkg/front_end/testcases/primary_constructors/new_in_initializer.dart:7:11: Error: This couldn't be parsed. | |
| Foo() : this.new = 42; | |
| ^" {} | |
| } |