Add OK tests, getter index for MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER.

Change-Id: I34039f61aefc6662cd3b4359024878ed3eca776c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2022-02-11 21:04:07 +00:00 committed by Commit Bot
parent da66e1f39a
commit 65d7aa3b49

View file

@ -273,6 +273,38 @@ enum E with M1, M2 {
]);
}
test_enum_getter_exists() async {
await assertNoErrorsInCode(r'''
mixin M1 {
int get foo => 0;
}
mixin M2 on M1 {
void bar() {
super.foo;
}
}
enum E with M1, M2 {
v
}
''');
}
test_enum_getter_index() async {
await assertNoErrorsInCode(r'''
mixin M on Enum {
void foo() {
super.index;
}
}
enum E with M {
v
}
''');
}
test_enum_method() async {
await assertErrorsInCode(r'''
mixin M1 {
@ -298,6 +330,24 @@ enum E with M1, M2 {
]);
}
test_enum_method_exists() async {
await assertNoErrorsInCode(r'''
mixin M1 {
void foo() {}
}
mixin M2 on M1 {
void bar() {
super.foo();
}
}
enum E with M1, M2 {
v
}
''');
}
test_enum_OK_getter_inPreviousMixin() async {
await assertNoErrorsInCode(r'''
mixin M1 {