apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
10.38k stars 280 forks source link

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

Open bioball opened 4 days ago

bioball commented 4 days ago

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))>
                                               ^^^^^^^^