Augment. Remove a few 'abstract' modifiers from classes.

These were previously added because the parser did not support
abstract fields without diagnostics, IIRC.

Change-Id: Iba654bbfba3828e9823a65cc2b28f11a9ae0144a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Konstantin Shcheglov
2026-06-02 11:58:59 -07:00
parent 856afa7248
commit 68b3e3c9a0
2 changed files with 10 additions and 10 deletions
@@ -111,13 +111,13 @@ augment class A {
test_class_instanceField_augments_instanceField_final() async {
await resolveTestCodeWithDiagnostics(r'''
abstract class A {
class A {
final int foo = 0;
// ^^^
// [context 1] The corresponding getter is induced by this declaration.
}
augment abstract class A {
augment class A {
augment abstract int foo;
// ^^^
// [diag.augmentationWithoutSetterDeclaration][context 1] This augmentation induces a setter, but no setter declaration named 'foo' exists to augment.
@@ -127,13 +127,13 @@ augment abstract class A {
test_class_instanceField_augments_instanceGetter() async {
await resolveTestCodeWithDiagnostics(r'''
abstract class A {
class A {
int get foo => 0;
// ^^^
// [context 1] The corresponding getter is declared here.
}
augment abstract class A {
augment class A {
augment abstract int foo;
// ^^^
// [diag.augmentationWithoutSetterDeclaration][context 1] This augmentation induces a setter, but no setter declaration named 'foo' exists to augment.
@@ -250,13 +250,13 @@ augment class A {
test_class_instanceField_final_augments_instanceSetter() async {
await resolveTestCodeWithDiagnostics(r'''
abstract class A {
class A {
set foo(int _) {}
// ^^^
// [context 1] The corresponding setter is declared here.
}
augment abstract class A {
augment class A {
augment abstract final int foo;
// ^^^
// [diag.augmentationWithoutGetterDeclaration][context 1] This augmentation induces a getter, but no getter declaration named 'foo' exists to augment.
@@ -154,13 +154,13 @@ class C {
test_instance_getter_field_augment() async {
await resolveTestCodeWithDiagnostics(r'''
abstract class C {
class C {
int get foo;
// ^^^
// [context 1] The corresponding getter is declared here.
}
augment abstract class C {
augment class C {
augment int foo = 0;
// ^^^
// [diag.augmentationWithoutSetterDeclaration][context 1] This augmentation induces a setter, but no setter declaration named 'foo' exists to augment.
@@ -459,13 +459,13 @@ class A(var int _, var int _);
test_instance_setter_field_augment() async {
await resolveTestCodeWithDiagnostics(r'''
abstract class C {
class C {
void set foo(int _);
// ^^^
// [context 1] The corresponding setter is declared here.
}
augment abstract class C {
augment class C {
augment int foo = 0;
// ^^^
// [diag.augmentationWithoutGetterDeclaration][context 1] This augmentation induces a getter, but no getter declaration named 'foo' exists to augment.