Behavior differs between local and non-local properties with no default value
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
Repro:
```pkl
class A {}
a: A
// result: a {}
local aLocal: A
// error: Missing property value.
```
I would expect `aLocal` to be initialized to the default value of `A` here instead.
This error is thrown during parsing, so it's not even necessary to have `aLocal` in the evaluation path to trigger it.
Also pkl-intellij does not register this as an error, only `pkl eval`.
Contributor guide
Research direction
Reproduce the example with pkl eval and compare its diagnostics with pkl-intellij. Trace the parsing path that reports “Missing property value” for local aLocal and the default-value behavior used for a; done when the local property behaves consistently and both tools report the intended result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100