The issue was that super calls were blocked inside let expressions because:
The compiler's isClassMemberScope() check didn't skip over lambda scopes created by let expressions
The runtime's findSupermethod() didn't traverse past VmFunction owners to find the actual class prototype
Changes:
SymbolTable.java: Updated isClassMemberScope() to skip lambda scopes before checking if the parent is a class or module scope
InvokeSuperMethodNode.java: Updated findSupermethod() to skip VmFunction owners when looking for the class prototype
Added regression tests covering:
Super method calls inside let expressions
Super property access inside let expressions
Nested let expressions with super calls
🔄 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/1383
**Author:** [@cipheraxat](https://github.com/cipheraxat)
**Created:** 12/22/2025
**Status:** 🔄 Open
**Base:** `main` ← **Head:** `fix/super-call-in-let-expression`
---
### 📝 Commits (1)
- [`5a5adf3`](https://github.com/apple/pkl/commit/5a5adf3e188fa97d805005369d35e803477461ea) Fix super method call inside let expression
### 📊 Changes
**4 files changed** (+52 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-core/src/main/java/org/pkl/core/ast/builder/SymbolTable.java` (+2 -0)
📝 `pkl-core/src/main/java/org/pkl/core/ast/expression/member/InvokeSuperMethodNode.java` (+3 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/classes/supercallsInLet.pkl` (+44 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/classes/supercallsInLet.pcf` (+3 -0)
</details>
### 📄 Description
Fixes #1309
The issue was that super calls were blocked inside let expressions because:
1. The compiler's isClassMemberScope() check didn't skip over lambda scopes created by let expressions
2. The runtime's findSupermethod() didn't traverse past VmFunction owners to find the actual class prototype
Changes:
- SymbolTable.java: Updated isClassMemberScope() to skip lambda scopes before checking if the parent is a class or module scope
- InvokeSuperMethodNode.java: Updated findSupermethod() to skip VmFunction owners when looking for the class prototype
Added regression tests covering:
- Super method calls inside let expressions
- Super property access inside let expressions
- Nested let expressions with super calls
---
<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/1383
Author: @cipheraxat
Created: 12/22/2025
Status: 🔄 Open
Base:
main← Head:fix/super-call-in-let-expression📝 Commits (1)
5a5adf3Fix super method call inside let expression📊 Changes
4 files changed (+52 additions, -0 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/ast/builder/SymbolTable.java(+2 -0)📝
pkl-core/src/main/java/org/pkl/core/ast/expression/member/InvokeSuperMethodNode.java(+3 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/classes/supercallsInLet.pkl(+44 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/classes/supercallsInLet.pcf(+3 -0)📄 Description
Fixes #1309
The issue was that super calls were blocked inside let expressions because:
Changes:
Added regression tests covering:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.