Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning about operator== param type. #1300

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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