dotlin-org/dotlin

Data classes with nullable variables: The implementation of '==' in the non-abstract class XYZ does not conform to its interface.

eggnstone opened this issue · 1 comments

Failed to load "C:/Dev/Packages/pub.dev/dart_format/test/MasterSplitter_split_test.dart":
lib/src/kotlin/dev/eggnstone/plugins/jetbrains/dartformat/splitters/iSplitters/text_splitter_handle_result.dt.g.dart:5:15: Error: The implementation of '==' in the non-abstract class '_$DefaultSplitResultValue' does not conform to its interface.
@sealed class _$DefaultSplitResultValue implements SplitResult{ const  _$DefaultSplitResultValue();@nonVirtual dynamic noSuchMethod(Invocation invocation){}}
              ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../SDKs/Flutter/bin/cache/dart-sdk/lib/_internal/vm/lib/object_patch.dart:21:36: Context: The parameter 'other' of the method 'Object.==' has type 'Object', which does not match the corresponding type, 'Object?', in the overridden method, 'SplitResult.=='.
 - 'Object' is from 'dart:core'.
Change to a supertype of 'Object?', or, for a covariant parameter, a subtype.
  external bool operator ==(Object other);
                                   ^
lib/src/kotlin/dev/eggnstone/plugins/jetbrains/dartformat/splitters/iSplitters/split_result.dt.g.dart:3:1109: Context: This is the overridden method ('==').
@sealed class SplitResult{  SplitResult(this.remainingText, this.parts, ) : super();@nonVirtual final String  remainingText;@nonVirtual final List<IPart>  parts;@nonVirtual String component1(){return this.remainingText;}@nonVirtual List<IPart> component2(){return this.parts;}@nonVirtual SplitResult copy({String? remainingText = null, List<IPart>? parts = null, }){remainingText = remainingText == null ? this.remainingText : remainingText;parts = parts == null ? this.parts : parts;return SplitResult(remainingText, parts);}@override String toString(){return "SplitResult(remainingText=${this.remainingText}, parts=${this.parts})";}@override int get hashCode{ int  result = this.remainingText.hashCode;result = result * 31 + this.parts.hashCode;return result;} bool equals(Object? other){if (identical(this, other)){return true;}if (other is! SplitResult){return false;}final SplitResult  tmp0_other_with_cast = other as SplitResult;if (this.remainingText != tmp0_other_with_cast.remainingText){return false;}if (this.parts != tmp0_other_with_cast.parts){return false;}return true;}@override bool operator ==(Object? other)=> this.equals(other);}

Closing because of Dirt.