Skip to content

Commit

Permalink
Fix warning about operator== param type. (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmorgan authored Feb 19, 2024
1 parent c03c1e9 commit 18dcf76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 8.9.1

- Fix for new warning about `operator==` param type.

# 8.9.0

- In `StandardJsonPlugin`, add support for specifying types that should be left
Expand Down
10 changes: 5 additions & 5 deletions built_value/lib/json_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class BoolJsonObject extends JsonObject {
bool get asBool => value;

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! BoolJsonObject) return false;
return value == other.value;
Expand All @@ -123,7 +123,7 @@ class ListJsonObject extends JsonObject {
List<Object?> get asList => value;

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! ListJsonObject) return false;
return const DeepCollectionEquality().equals(value, other.value);
Expand All @@ -149,7 +149,7 @@ class MapJsonObject extends JsonObject {
Map<String, Object?> get asMap => value;

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! MapJsonObject) return false;
return const DeepCollectionEquality().equals(value, other.value);
Expand All @@ -173,7 +173,7 @@ class NumJsonObject extends JsonObject {
num get asNum => value;

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! NumJsonObject) return false;
return value == other.value;
Expand All @@ -197,7 +197,7 @@ class StringJsonObject extends JsonObject {
String get asString => value;

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! StringJsonObject) return false;
return value == other.value;
Expand Down
2 changes: 1 addition & 1 deletion built_value/lib/serializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class FullType {
: FullType(root, parameters);

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (identical(other, this)) return true;
if (other is! FullType) return false;
if (root != other.root) return false;
Expand Down

0 comments on commit 18dcf76

Please sign in to comment.