mirror of
https://github.com/apple/pkl.git
synced 2026-06-17 19:09:41 +02:00
codegen-java/kotlin: Fix generation of hashCode methods (#802)
codegen-java: - use `pattern.pattern()` instead of `pattern` in hashCode method (consistent with equals method) codegen-kotlin: - use `regex.pattern` instead of `regex` in hashCode method (consistent with equals method) - if a data class has a Regex property, generate not only an equals method but also a hashCode method
This commit is contained in:
@@ -306,7 +306,7 @@ public final class Mod {
|
||||
result = 31 * result + Objects.hashCode(this.container);
|
||||
result = 31 * result + Objects.hashCode(this.container2);
|
||||
result = 31 * result + Objects.hashCode(this.other);
|
||||
result = 31 * result + Objects.hashCode(this.regex);
|
||||
result = 31 * result + Objects.hashCode(this.regex.pattern());
|
||||
result = 31 * result + Objects.hashCode(this.any);
|
||||
result = 31 * result + Objects.hashCode(this.nonNull);
|
||||
result = 31 * result + Objects.hashCode(this._enum);
|
||||
|
||||
Reference in New Issue
Block a user