New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type constraints on typealias
es are evaluated eagerly
#446
Comments
My understanding is that accessing |
I can't reproduce this (but also; the snippets you included are not syntactically valid Pkl, so I think something got lost in reduction of the example). There is a known bug that By the way, |
I think @sin-ack is using 0.26.0-dev, which reproduces for me. We currently have an issue in the latest dev version where typealias bodies are not late-bound (changed a fix for a scoping bug in #144). But, at the same time, they aren't required to be We're thinking through whether typealias bodies should be late-bound, or if this is actually the correct behavior. If this is the correct behavior, then we will add an additional rule that references must be const. If not, then we need to adjust the behavior here so that those references are late-bound. |
Consider the following (the required
typealias
redirection is another issue):As expected. However, if we change
foo
's definition to:Then I get:
Placing a
trace()
onbar
reveals thatbar
is aMapping {}
during the evaluation of the constraint, which is unexpected (to me at least). Is this intended behavior?The text was updated successfully, but these errors were encountered: