🐛`fixed` properties not respected by `toTyped()`
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
The `toTyped` API doesn't respect `fixed` properties on classes, resulting in the following unexpected outcome:
```pkl
class Bird {
fixed type = "Parrot"
name = "Polly"
}
untypedBird {
type = "Cocker spaniel"
name = "Morris"
}
result = untypedBird.toTyped(Bird)
```
[produces](https://pkl-playground.vercel.app/?share=truck-species-screen)
```
untypedBird {
type = "Cocker spaniel"
name = "Morris"
}
result {
type = "Cocker spaniel"
name = "Morris"
}
```
Contributor guide
Research direction
Start by reproducing the provided Pkl example in the linked playground and trace the toTyped API behavior for fixed properties. The work is done when converting untypedBird to Bird preserves Bird's fixed type value instead of accepting the input value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100