mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-14 10:01:05 -05:00
In order to be able to predict a result type even if arguments are not yet known, coalesce requires all of its arguments to be of the same type. Our usual automatic conversion rules mean that in some cases the result is a silent type conversion rather than an explicit error, so we'll at least document that so that folks who encounter it can understand what is causing the likely-surprising behavior. If we were building this function over again today I expect we'd make it always return an error under type mismatch, but to do so now would be a breaking change and the potential cost of that seems too high for something that doesn't seem to arise incredibly often in practice.