Created with <3 with dartpad.dev.
Created
September 28, 2023 19:51
-
-
Save XavierChanth/c1eb0ad0dd5adee91c61522bda839db3 to your computer and use it in GitHub Desktop.
zealous-flash-8405
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
void main() { | |
D().dispose(); | |
} | |
abstract class A { | |
FutureOr<void> dispose(); | |
} | |
abstract class B { | |
@override | |
Future<void> dispose() async { | |
print('B'); | |
} | |
} | |
mixin C on B { | |
@override | |
Future<void> dispose() async { | |
print('C'); | |
super.dispose(); | |
} | |
} | |
class D extends B with C { | |
@override | |
Future<void> dispose() async { | |
print('D'); | |
super.dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment