mirror of
https://github.com/apple/pkl.git
synced 2026-09-13 21:31:52 +02:00
Fix bug in force (#1790)
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
undefinedValue: String
|
||||
|
||||
items = new Listing {
|
||||
undefinedValue
|
||||
}
|
||||
|
||||
lookup = new Mapping {
|
||||
["x"] = 1
|
||||
}
|
||||
|
||||
result =
|
||||
let (_ = trace(items))
|
||||
new Listing {
|
||||
for (item in items) {
|
||||
lookup.containsKey(item)
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
value = result
|
||||
}
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
–– Pkl Error ––
|
||||
Tried to read property `undefinedValue` but its value is undefined.
|
||||
|
||||
x | undefinedValue: String
|
||||
^^^^^^^^^^^^^^
|
||||
at traceThenIterateUndefinedMember#undefinedValue (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
|
||||
x | undefinedValue
|
||||
^^^^^^^^^^^^^^
|
||||
at traceThenIterateUndefinedMember#items[#1] (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
|
||||
xx | let (_ = trace(items))
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
at traceThenIterateUndefinedMember#result.<let expr> (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
|
||||
xx | value = result
|
||||
^^^^^^
|
||||
at traceThenIterateUndefinedMember#output.value (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
|
||||
xxx | renderer.renderDocument(value)
|
||||
^^^^^
|
||||
at pkl.base#Module.output.text (pkl:base)
|
||||
|
||||
xxx | if (renderer is BytesRenderer) renderer.renderDocument(value) else text.encodeToBytes("UTF-8")
|
||||
^^^^
|
||||
at pkl.base#Module.output.bytes (pkl:base)
|
||||
pkl: TRACE: items = new Listing { ? } (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
Reference in New Issue
Block a user