[PR #575] [CLOSED] Fix default value evaluation in toTyped() #626

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/575
Author: @luuvish
Created: 7/12/2024
Status: Closed

Base: mainHead: main


📝 Commits (2)

  • 66cc30f Fix default value evaluation in toTyped()
  • 46af485 Merge branch 'apple:main' into main

📊 Changes

5 files changed (+88 additions, -2 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/ast/member/DelegateToExtraStorageMapOrParentNode.java (+3 -1)
📝 pkl-core/src/main/java/org/pkl/core/ast/member/DelegateToExtraStorageObjOrParentNode.java (+2 -1)
📝 pkl-core/src/main/java/org/pkl/core/runtime/VmUtils.java (+36 -0)
pkl-core/src/test/files/LanguageSnippetTests/input/api/toTypedWithDefault.pkl (+25 -0)
pkl-core/src/test/files/LanguageSnippetTests/output/api/toTypedWithDefault.pcf (+22 -0)

📄 Description

Fix the issue where default values defined in the class are not properly
generated when converting Dynamic or Map objects to Typed objects.
Also, fix the issue where values are not properly generated for amended
properties when making amends to the converted Typed objects.


🔄 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/575 **Author:** [@luuvish](https://github.com/luuvish) **Created:** 7/12/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`66cc30f`](https://github.com/apple/pkl/commit/66cc30fe44442b6477a6ecdc4fcca924e17c803e) Fix default value evaluation in toTyped() - [`46af485`](https://github.com/apple/pkl/commit/46af4854ed941521698ff4d8439ff82a1a3f8e4c) Merge branch 'apple:main' into main ### 📊 Changes **5 files changed** (+88 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/ast/member/DelegateToExtraStorageMapOrParentNode.java` (+3 -1) 📝 `pkl-core/src/main/java/org/pkl/core/ast/member/DelegateToExtraStorageObjOrParentNode.java` (+2 -1) 📝 `pkl-core/src/main/java/org/pkl/core/runtime/VmUtils.java` (+36 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/input/api/toTypedWithDefault.pkl` (+25 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/output/api/toTypedWithDefault.pcf` (+22 -0) </details> ### 📄 Description Fix the issue where default values defined in the class are not properly generated when converting Dynamic or Map objects to Typed objects. Also, fix the issue where values are not properly generated for amended properties when making amends to the converted Typed objects. --- <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:25:43 +01:00
adam closed this issue 2025-12-30 01:25:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#626