mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:17:14 +00:00
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:
parent
da66e1f39a
commit
65d7aa3b49
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue