Last active
December 5, 2022 11:43
-
-
Save yanok/b38530d5832a0daa809f346508ca8b48 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
abstract class A { | |
@override | |
bool operator ==(dynamic other); | |
} | |
class B implements A {} | |
void test(dynamic x, dynamic y, dynamic z) { | |
print(x == y || x == z); | |
} | |
void main() { | |
var b1 = B(), b2 = B(); | |
B? b3; | |
print(b1 == null); | |
print(b1 == b2); | |
print(b3 == b2); | |
print(b3 == null); | |
test(b1, b2, b3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment