riverpod icon indicating copy to clipboard operation
riverpod copied to clipboard

Generator produces conflicting hash functions with what should be separate entities

Open TekExplorer opened this issue 9 months ago • 0 comments

Describe the bug class Thing and _thing() generates the same String _$thingHash(), causing a compilation error the hash itself is distinct, as expected, but the name conflict should not happen - especially as its private to begin with

To Reproduce

@riverpod
String _thing() => '';

@riverpod
class Thing extends _$Thing {
  String build() => '';
}

presumably the same thing happens if you use _thing() and thing()

Expected behavior The hash functions should be distinct.

TekExplorer avatar May 17 '25 04:05 TekExplorer