Files
sdk/tests/language/nnbd/syntax/required_modifier_error_test.dart
T
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00

40 lines
726 B
Dart

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Invalid uses of "required" modifier
required //# 01: syntax error
int f1(
required //# 02: syntax error
int x
) => throw 0;
required //# 03: syntax error
class C1 {
required //# 04: syntax error
int f2 = 0;
}
// Duplicate modifier
void f2({
required
required //# 05: syntax error
int i,
}){
}
// Out of order modifiers
class C2 {
void m({
required int i1,
covariant required int i2, //# 07: syntax error
final required int i3, //# 08: syntax error
}) {
}
}
main() {
}