Browse Source

fix(dynamite): Skip comparing nullable in type results

pull/519/head
jld3103 1 year ago
parent
commit
e13dc0a947
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 8
      packages/dynamite/dynamite/lib/src/type_result/enum.dart
  2. 8
      packages/dynamite/dynamite/lib/src/type_result/list.dart
  3. 8
      packages/dynamite/dynamite/lib/src/type_result/map.dart
  4. 4
      packages/dynamite/dynamite/lib/src/type_result/type_result.dart

8
packages/dynamite/dynamite/lib/src/type_result/enum.dart

@ -34,12 +34,8 @@ class TypeResultEnum extends TypeResult {
@override
bool operator ==(final Object other) =>
other is TypeResultEnum &&
other.className == className &&
other.generics == generics &&
other.nullable == nullable &&
other.subType == subType;
other is TypeResultEnum && other.className == className && other.generics == generics && other.subType == subType;
@override
int get hashCode => className.hashCode + generics.hashCode + nullable.hashCode + subType.hashCode;
int get hashCode => className.hashCode + generics.hashCode + subType.hashCode;
}

8
packages/dynamite/dynamite/lib/src/type_result/list.dart

@ -34,12 +34,8 @@ class TypeResultList extends TypeResult {
@override
bool operator ==(final Object other) =>
other is TypeResultList &&
other.className == className &&
other.generics == generics &&
other.nullable == nullable &&
other.subType == subType;
other is TypeResultList && other.className == className && other.generics == generics && other.subType == subType;
@override
int get hashCode => className.hashCode + generics.hashCode + nullable.hashCode + subType.hashCode;
int get hashCode => className.hashCode + generics.hashCode + subType.hashCode;
}

8
packages/dynamite/dynamite/lib/src/type_result/map.dart

@ -21,12 +21,8 @@ class TypeResultMap extends TypeResult {
@override
bool operator ==(final Object other) =>
other is TypeResultMap &&
other.className == className &&
other.generics == generics &&
other.nullable == nullable &&
other.subType == subType;
other is TypeResultMap && other.className == className && other.generics == generics && other.subType == subType;
@override
int get hashCode => className.hashCode + generics.hashCode + nullable.hashCode + subType.hashCode;
int get hashCode => className.hashCode + generics.hashCode + subType.hashCode;
}

4
packages/dynamite/dynamite/lib/src/type_result/type_result.dart

@ -101,8 +101,8 @@ abstract class TypeResult {
@override
bool operator ==(final Object other) =>
other is TypeResult && other.className == className && other.generics == generics && other.nullable == nullable;
other is TypeResult && other.className == className && other.generics == generics;
@override
int get hashCode => className.hashCode + generics.hashCode + nullable.hashCode;
int get hashCode => className.hashCode + generics.hashCode;
}

Loading…
Cancel
Save