Skip to content

Commit 327c6aa

Browse files
knaeckeKamidavidmorgan
authored andcommitted
refactor(built_value_generator): preserve comment for seed
1 parent a64fd2f commit 327c6aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

built_value_generator/lib/src/value_source_class.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,8 @@ abstract class ValueSourceClass
12061206
result.writeln('if (__hashCode != null) return __hashCode$notNull;');
12071207
}
12081208

1209+
// Use a different seed for builders than for values, so they do not have
1210+
// identical hashCodes if the values are identical.
12091211
final seed = forBuilder ? 1 : 0;
12101212
result.writeln('int hash = $seed;');
12111213

0 commit comments

Comments
 (0)