–– Pkl Error ––
Type constraint `!isEmpty` violated.
Value: new Listing {}
!isEmpty
││
│true
false
2 | bar: Listing(!isEmpty)
^^^^^^^^
at test#Foo.bar (/Users/danielchao/code/apple/pkl/.dan-scripts/test.pkl:2)
2 | bar: Listing(!isEmpty)
^^^
at test#Foo.bar (/Users/danielchao/code/apple/pkl/.dan-scripts/test.pkl:2)
3 | foo: Listing = bar
^^^
at test#Foo.foo (/Users/danielchao/code/apple/pkl/.dan-scripts/test.pkl:3)
132 | renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (https://github.com/apple/pkl/blob/0.31.0/stdlib/base.pkl#L132)
136 | if (renderer is BytesRenderer) renderer.renderDocument(value) else text.encodeToBytes("UTF-8")
^^^^
at pkl.base#Module.output.bytes (https://github.com/apple/pkl/blob/0.31.0/stdlib/base.pkl#L136)
This snippet throws:
Produces error: