Skip to content

Instantly share code, notes, and snippets.

@yanok
Last active December 5, 2022 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanok/b38530d5832a0daa809f346508ca8b48 to your computer and use it in GitHub Desktop.
Save yanok/b38530d5832a0daa809f346508ca8b48 to your computer and use it in GitHub Desktop.
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