Skip to content

Commit b43b7ab

Browse files
authored
Update equality.dart (#373)
Improve compatibility with Dart’s is! operator
1 parent b77b65e commit b43b7ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/graphql_codegen/lib/src/printer/base/equality.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Method printEqualityOperator(
2828
..statements = ListBuilder([
2929
Code("if (identical(this, other)) {return true;}"),
3030
Code(
31-
"if (!(other is ${name}) || runtimeType != other.runtimeType) {return false;}"),
31+
"if (other is! ${name} || runtimeType != other.runtimeType) {return false;}"),
3232
...properties.expand(
3333
(e) {
3434
final localThisName =

0 commit comments

Comments
 (0)