Created
December 5, 2022 11:49
-
-
Save yanok/1763ace42439faf7cd5da4fa8ac9dd4a to your computer and use it in GitHub Desktop.
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
abstract class A { | |
@override | |
bool operator ==(Object? 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