It's trickier than that in heterogeneous builders, and I wouldn't expect anyone to think that assert(x)
becomes EmptyView
.
It should still be reasonable to ignore buildExpression
returning Never
and/or Void
. No cake for @discardableResult
though as it's not visible to the type system.
Also, both solutions require the builder to include buildExpression
, which is currently optional.