[PR #705] [MERGED] codegen-kotlin: Fix generation of copy() methods #685

Closed
opened 2025-12-30 01:26:09 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/705
Author: @odenix
Created: 10/18/2024
Status: Merged
Merged: 10/20/2024
Merged by: @bioball

Base: mainHead: codegen-kotlin


📝 Commits (2)

  • 9bb5d6a codegen-kotlin: Fix generation of copy() methods
  • b2acb73 Incorporate review feedback

📊 Changes

2 files changed (+217 additions, -1 deletions)

View changed files

📝 pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt (+12 -1)
📝 pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt (+205 -0)

📄 Description

  • don't generate copy methods for abstract classes
  • precisely determine if copy method needs override modifier (tricky)

Fixes #569


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/705 **Author:** [@odenix](https://github.com/odenix) **Created:** 10/18/2024 **Status:** ✅ Merged **Merged:** 10/20/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `codegen-kotlin` --- ### 📝 Commits (2) - [`9bb5d6a`](https://github.com/apple/pkl/commit/9bb5d6a5aacb491e3af34eefcf75f436926bb53b) codegen-kotlin: Fix generation of copy() methods - [`b2acb73`](https://github.com/apple/pkl/commit/b2acb73f7769d8fa21ebf9729a85cac37bbb361d) Incorporate review feedback ### 📊 Changes **2 files changed** (+217 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt` (+12 -1) 📝 `pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt` (+205 -0) </details> ### 📄 Description - don't generate copy methods for abstract classes - precisely determine if copy method needs override modifier (tricky) Fixes #569 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:26:09 +01:00
adam closed this issue 2025-12-30 01:26:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#685