diff --git a/drift/lib/src/runtime/query_builder/expressions/expression.dart b/drift/lib/src/runtime/query_builder/expressions/expression.dart index 262fbe2fe..9c5a7be31 100644 --- a/drift/lib/src/runtime/query_builder/expressions/expression.dart +++ b/drift/lib/src/runtime/query_builder/expressions/expression.dart @@ -636,7 +636,7 @@ class _SubqueryExpression extends Expression { int get hashCode => statement.hashCode; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is _SubqueryExpression && other.statement == statement; } } diff --git a/sqlparser/lib/src/analysis/types/data.dart b/sqlparser/lib/src/analysis/types/data.dart index 33afe39cd..a0cd49334 100644 --- a/sqlparser/lib/src/analysis/types/data.dart +++ b/sqlparser/lib/src/analysis/types/data.dart @@ -81,7 +81,7 @@ class ResolvedType { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || other is ResolvedType && other.type == type && @@ -112,7 +112,7 @@ abstract class TypeHint { @override int get hashCode => runtimeType.hashCode; @override - bool operator ==(dynamic other) => other.runtimeType == runtimeType; + bool operator ==(Object other) => other.runtimeType == runtimeType; } /// Type hint to mark that this type will contain a boolean value. @@ -181,7 +181,7 @@ class ResolveResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || other is ResolveResult && other.type == type && diff --git a/sqlparser/lib/src/ast/drift/declared_statement.dart b/sqlparser/lib/src/ast/drift/declared_statement.dart index 403613310..550724eaf 100644 --- a/sqlparser/lib/src/ast/drift/declared_statement.dart +++ b/sqlparser/lib/src/ast/drift/declared_statement.dart @@ -64,7 +64,7 @@ class SimpleName extends DeclaredStatementIdentifier { int get hashCode => name.hashCode; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other is SimpleName && other.name == name); } @@ -87,7 +87,7 @@ class SpecialStatementIdentifier extends DeclaredStatementIdentifier { String get name => specialName; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other is SpecialStatementIdentifier && other.specialName == specialName); diff --git a/sqlparser/lib/src/ast/expressions/aggregate.dart b/sqlparser/lib/src/ast/expressions/aggregate.dart index 8f365319b..feca4f38f 100644 --- a/sqlparser/lib/src/ast/expressions/aggregate.dart +++ b/sqlparser/lib/src/ast/expressions/aggregate.dart @@ -241,7 +241,7 @@ class FrameBoundary { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(this, other)) return true; if (other.runtimeType != runtimeType) return false; diff --git a/sqlparser/lib/src/ast/statements/create_trigger.dart b/sqlparser/lib/src/ast/statements/create_trigger.dart index 14a555f8f..616f372f2 100644 --- a/sqlparser/lib/src/ast/statements/create_trigger.dart +++ b/sqlparser/lib/src/ast/statements/create_trigger.dart @@ -56,7 +56,7 @@ abstract class TriggerTarget extends AstNode { int get hashCode => runtimeType.hashCode; @override - bool operator ==(dynamic other) => other.runtimeType == runtimeType; + bool operator ==(Object other) => other.runtimeType == runtimeType; @override Iterable get childNodes => const Iterable.empty(); diff --git a/sqlparser/lib/utils/find_referenced_tables.dart b/sqlparser/lib/utils/find_referenced_tables.dart index e809db4d6..3e95ce0d2 100644 --- a/sqlparser/lib/utils/find_referenced_tables.dart +++ b/sqlparser/lib/utils/find_referenced_tables.dart @@ -68,7 +68,7 @@ class TableWrite { int get hashCode => 37 * table.hashCode + kind.hashCode; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return other is TableWrite && other.table == table && other.kind == kind; } } diff --git a/sqlparser/test/parser/select/common_table_expression_test.dart b/sqlparser/test/parser/select/common_table_expression_test.dart index b05b4079f..0b5049733 100644 --- a/sqlparser/test/parser/select/common_table_expression_test.dart +++ b/sqlparser/test/parser/select/common_table_expression_test.dart @@ -6,7 +6,7 @@ import '../utils.dart'; void main() { test('parses WITH clauses', () { testStatement( - ''' + ''' WITH RECURSIVE cnt(x) AS ( SELECT 1