Regression: incorrect scope in T of typealias of Listing<T>/Mapping<K, T> #251

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

Originally created by @bioball on GitHub (Nov 18, 2024).

Given:

// mod1.pkl
const local lastName = "Smith"

typealias Smiths = Listing<String(endsWith(lastName))>

This breaks:

import "mod1.pkl"

res: mod1.Smiths = new { "Lily Smith" }

Error:

–– Pkl Error ––
Cannot find property `lastName`.

3 | typealias Smiths = Listing<String(endsWith(lastName))>
                                               ^^^^^^^^
Originally created by @bioball on GitHub (Nov 18, 2024). Given: ```pkl // mod1.pkl const local lastName = "Smith" typealias Smiths = Listing<String(endsWith(lastName))> ``` This breaks: ```pkl import "mod1.pkl" res: mod1.Smiths = new { "Lily Smith" } ``` Error: ``` –– Pkl Error –– Cannot find property `lastName`. 3 | typealias Smiths = Listing<String(endsWith(lastName))> ^^^^^^^^ ```
adam added the bug label 2025-12-30 01:22:45 +01:00
adam closed this issue 2025-12-30 01:22:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#251