mirror of
https://github.com/apple/pkl.git
synced 2026-01-14 15:43:41 +01:00
[PR #714] [MERGED] codegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes #688
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/714
Author: @odenix
Created: 10/20/2024
Status: ✅ Merged
Merged: 10/24/2024
Merged by: @bioball
Base:
main← Head:codegen-abstract📝 Commits (3)
498a21acodegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes0f85eb1Polish KotlinCodeGeneratorTesta7936f5Overhaul KotlinCodeGeneratorTest📊 Changes
2 files changed (+858 additions, -776 deletions)
View changed files
📝
pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt(+8 -7)📝
pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt(+850 -769)📄 Description
Motivation:
Don't generate code that isn't useful.
Changes:
Result:
Note:
codegen-java does the same for stateless classes, but it also makes them non-instantiable.
codegen-kotlin generates stateless regular classes far less often than codegen-java.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.