[PR #428] [MERGED] Cannot assign property with fixed/const in spread #548

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/428
Author: @luuvish
Created: 4/13/2024
Status: Merged
Merged: 4/16/2024
Merged by: @bioball

Base: mainHead: main


📝 Commits (1)

  • 96da7e5 Cannot assign property with fixed/const in spread

📊 Changes

3 files changed (+52 additions, -13 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/ast/expression/generator/GeneratorSpreadNode.java (+33 -13)
pkl-core/src/test/files/LanguageSnippetTests/input/errors/cannotAssignFixedProperty3.pkl (+5 -0)
pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotAssignFixedProperty3.err (+14 -0)

📄 Description

When using spread syntax with typed object, properties that are fixed or const cannot be assigned or amended.
This should be checked in the checkTypedProperty() function.


🔄 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/428 **Author:** [@luuvish](https://github.com/luuvish) **Created:** 4/13/2024 **Status:** ✅ Merged **Merged:** 4/16/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`96da7e5`](https://github.com/apple/pkl/commit/96da7e55272128078c90fc8173d918049eec87ee) Cannot assign property with fixed/const in spread ### 📊 Changes **3 files changed** (+52 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/ast/expression/generator/GeneratorSpreadNode.java` (+33 -13) ➕ `pkl-core/src/test/files/LanguageSnippetTests/input/errors/cannotAssignFixedProperty3.pkl` (+5 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/output/errors/cannotAssignFixedProperty3.err` (+14 -0) </details> ### 📄 Description When using spread syntax with typed object, properties that are fixed or const cannot be assigned or amended. This should be checked in the checkTypedProperty() function. --- <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:16 +01:00
adam closed this issue 2025-12-30 01:25:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#548