Skip to content

Make validate() a member function on Refined types#610

Merged
wilmveel merged 2 commits intomasterfrom
feat/validate-member-function
Mar 12, 2026
Merged

Make validate() a member function on Refined types#610
wilmveel merged 2 commits intomasterfrom
feat/validate-member-function

Conversation

@wilmveel
Copy link
Copy Markdown
Contributor

Summary

  • Change validate from a static/extension function to an instance member on refined types, aligning with the Wirespec.Refined<T> interface contract
  • Java: public static boolean validate(X record)public boolean validate()
  • Kotlin: fun X.validate() extension → override fun validate() member
  • Update Wirespec.Refined interface to include fun validate(): Boolean

Test plan

  • All JVM tests pass (./gradlew jvmTest — BUILD SUCCESSFUL)
  • Verify CI passes on all platforms

🤖 Generated with Claude Code

wilmveel and others added 2 commits March 12, 2026 11:45
Change validate from a static/extension function to an instance member
on refined types, aligning with the Wirespec.Refined<T> interface contract.

- Java: public static boolean validate(X record) → public boolean validate()
- Kotlin: fun X.validate() extension → override fun validate() member
- Update Wirespec.Refined interface to include fun validate(): Boolean
- Update all emitter tests, generated fixtures, and docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
validate() is now a member function on Refined types, so the
extension function import is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wilmveel wilmveel merged commit a5f3e08 into master Mar 12, 2026
30 checks passed
@wilmveel wilmveel deleted the feat/validate-member-function branch March 12, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants