You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
l = new Listing { "foo" }
l2 = (l) {
[0] = "bar"
}
l3 = new Listing<Int> {
...l2
}
The error message correctly complains about "bar" but shows the source location of "foo":
–– Pkl Error ––
Expected value of type `Int`, but got type `String`.
Value: "bar"
7 | l3 = new Listing<Int> {
^^^
at test#l3 (file:///D:/pkl/test.pkl, line 7)
1 | l = new Listing { "foo" }
^^^^^
at test#l[#1] (file:///D:/pkl/test.pkl, line 1)
This issue is caused by a fundamental flaw in how VmObject.iterateMemberValues() works. The same issue likely exists in other places.
I'm working towards a fix that offers better ways to iterate over VmObject. (It's how I discovered this problem.)
PS: The blue colored line numbers 7 | and 1 | are difficult to read on black background.
The text was updated successfully, but these errors were encountered:
The error message correctly complains about "bar" but shows the source location of "foo":
This issue is caused by a fundamental flaw in how
VmObject.iterateMemberValues()
works. The same issue likely exists in other places.I'm working towards a fix that offers better ways to iterate over
VmObject
. (It's how I discovered this problem.)PS: The blue colored line numbers
7 |
and1 |
are difficult to read on black background.The text was updated successfully, but these errors were encountered: