Open HT154 opened 3 weeks ago
IntelliJ complains about code that is considered valid by pkl eval. Repro, with IntelliJ diags commented inline:
pkl eval
class Gizmo { name: String } x: Mapping<String, *Gizmo|Any> = new { ["a"] { // ^ Cannot amend value of type `Any` name = "hello" } ["c"] = new { // ^^^ Cannot instantiate type `Any` name = "goodbye" } ["c"] = 123 } typealias GizmoAny = *Gizmo|Any y: Mapping<String, GizmoAny> = new { ["a"] { // ^ Cannot amend value of type `GizmoAny` name = "hello" } ["c"] = new { // ^^^ Cannot instantiate type `GizmoAny` name = "goodbye" } ["c"] = 123 }
IntelliJ complains about code that is considered valid by
pkl eval
. Repro, with IntelliJ diags commented inline: