This fixes a problem where the delegate chain of type casts for Listing/Mapping get unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation.
🔄 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/826
**Author:** [@stackoverflow](https://github.com/stackoverflow)
**Created:** 11/21/2024
**Status:** ✅ Merged
**Merged:** 11/22/2024
**Merged by:** [@stackoverflow](https://github.com/stackoverflow)
**Base:** `main` ← **Head:** `fix-stack-overflow-in-typenode`
---
### 📝 Commits (1)
- [`cd1a35b`](https://github.com/apple/pkl/commit/cd1a35bfef3dd437d7742177c3b5c5452d1b7782) Fix possible stack overflow in Listing/Mapping type checking
### 📊 Changes
**1 file changed** (+42 additions, -38 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-core/src/main/java/org/pkl/core/ast/type/TypeNode.java` (+42 -38)
</details>
### 📄 Description
This fixes a problem where the delegate chain of type casts for `Listing`/`Mapping` get unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation.
Closes #827
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/826
Author: @stackoverflow
Created: 11/21/2024
Status: ✅ Merged
Merged: 11/22/2024
Merged by: @stackoverflow
Base:
main← Head:fix-stack-overflow-in-typenode📝 Commits (1)
cd1a35bFix possible stack overflow in Listing/Mapping type checking📊 Changes
1 file changed (+42 additions, -38 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/ast/type/TypeNode.java(+42 -38)📄 Description
This fixes a problem where the delegate chain of type casts for
Listing/Mappingget unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation.Closes #827
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.