blob: ce1db3e274682c2c91298901e2315748f5f4701d [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/late.dart:5:6: Error: Expected ';' after this.
// late int lateStaticField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:5:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// late int lateStaticField;
// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// late final int finalLateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:6:1: Error: Expected ';' after this.
// late final int finalLateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:6:16: Error: The final variable 'finalLateStaticField' must be initialized.
// Try adding an initializer ('= <expression>') to the declaration.
// late final int finalLateStaticField;
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:9:8: Error: Expected ';' after this.
// late int lateInstanceField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:9:12: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// late int lateInstanceField;
// ^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// late final int finalLateInstanceField = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:10:3: Error: Expected ';' after this.
// late final int finalLateInstanceField = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: Expected ';' after this.
// static late int lateStaticField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:12:15: Error: 'int' is already declared in this scope.
// static late int lateStaticField;
// ^^^
// pkg/front_end/testcases/nnbd/late.dart:9:8: Context: Previous declaration of 'int'.
// late int lateInstanceField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:12:19: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// static late int lateStaticField;
// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
// Try adding the name of the type of the variable or the keyword 'var'.
// static late final int finalLateStaticField = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: Expected ';' after this.
// static late final int finalLateStaticField = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:13:10: Error: 'late' is already declared in this scope.
// static late final int finalLateStaticField = 0;
// ^^^^
// pkg/front_end/testcases/nnbd/late.dart:10:3: Context: Previous declaration of 'late'.
// late final int finalLateInstanceField = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:9:3: Warning: 'late' isn't a type.
// late int lateInstanceField;
// ^^^^
// pkg/front_end/testcases/nnbd/late.dart:9:3: Context: This isn't a type.
// late int lateInstanceField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:10:14: Warning: 'int' isn't a type.
// late final int finalLateInstanceField = 0;
// ^^^
// pkg/front_end/testcases/nnbd/late.dart:10:14: Context: This isn't a type.
// late final int finalLateInstanceField = 0;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:12:10: Warning: 'late' isn't a type.
// static late int lateStaticField;
// ^^^^
// pkg/front_end/testcases/nnbd/late.dart:12:10: Context: This isn't a type.
// static late int lateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:13:21: Warning: 'int' isn't a type.
// static late final int finalLateStaticField = 0;
// ^^^
// pkg/front_end/testcases/nnbd/late.dart:13:21: Context: This isn't a type.
// static late final int finalLateStaticField = 0;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
// late int lateStaticField;
// ^^^^
// pkg/front_end/testcases/nnbd/late.dart:6:1: Context: This isn't a type.
// late final int finalLateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
// late final int finalLateStaticField;
// ^^^
// pkg/front_end/testcases/nnbd/late.dart:5:6: Context: This isn't a type.
// late int lateStaticField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:5:1: Warning: 'late' isn't a type.
// late int lateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:6:12: Warning: 'int' isn't a type.
// late final int finalLateStaticField;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:9:3: Error: Can't use 'late' because it is declared more than once.
// late int lateInstanceField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:10:14: Error: Can't use 'int' because it is declared more than once.
// late final int finalLateInstanceField = 0;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:12:10: Error: Can't use 'late' because it is declared more than once.
// static late int lateStaticField;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:13:21: Error: Can't use 'int' because it is declared more than once.
// static late final int finalLateStaticField = 0;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:16:5: Error: Can't use 'late' because it is declared more than once.
// late int lateVariable;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:16:10: Error: Expected ';' after this.
// late int lateVariable;
// ^^^
//
// pkg/front_end/testcases/nnbd/late.dart:16:14: Warning: Getter not found: 'lateVariable'.
// late int lateVariable;
// ^^^^^^^^^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Expected ';' after this.
// late final int lateFinalVariable = 0;
// ^^^^
//
// pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
// late final int lateFinalVariable = 0;
// ^
//
// pkg/front_end/testcases/nnbd/late.dart:17:16: Warning: 'int' isn't a type.
// late final int lateFinalVariable = 0;
// ^^^
//
import self as self;
import "dart:core" as core;
class Class extends core::Object {
field invalid-type int = null;
field dynamic lateInstanceField = null;
field dynamic late = null;
final field invalid-type finalLateInstanceField = 0;
field dynamic lateStaticField = null;
final field invalid-type finalLateStaticField = 0;
synthetic constructor •() self::Class*
: super core::Object::•()
;
method method() dynamic {
invalid-type int;
this.lateVariable;
invalid-expression "pkg/front_end/testcases/nnbd/late.dart:17:5: Error: Can't use 'late' because it is declared more than once.
late final int lateFinalVariable = 0;
^";
final invalid-type lateFinalVariable = 0;
}
}
static field invalid-type int;
static field dynamic lateStaticField;
static field dynamic late;
static final field invalid-type finalLateStaticField;
static method main() dynamic {}