I found the answer:
In my example I referenced 'workIdFilter' but didn't show its definition because it didn't matter, or shouldn't have mattered. Here it is:
let workIdFilter: MapboxMaps.Expression = Exp(.not) {
Exp(.inExpression) {
Exp(.get) { "WorkId" }
Array(hiddenWorkIds)
}
}
What I'm trying to do here is hide features where the property "WorkId" is contained in the array "hiddenWorkIds".
And here's the problem - when "hiddenWorkIds" is an empty array, it doesn't work right. I can't tell exactly what is happening but I'm guessing there's some error internally that is causing the whole expression to fail and therefore not hide anything.
The workaround is pretty simple -- I just put some dummy value into the array to make sure it is never empty.
This seems like a bug to me. Surely .inExpression should accept an empty list and behave as expected?