On Apr 9, 2017, at 9:59 PM, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
> Tom's response has the explanation of why it fails (everywhere, not just
> in the exception block): parse analysis prefers to match the (array ||
> array) form of the operator when given input of (array || unknown). Just
> cast the 'foo' to the array element type.
Tried to reduce this from some code I’m working on. I have a whole bunch of code that appends to an array in this way
withoutcasting ‘foo’ to text or text[]. It’s only in an exception block that it’s complaining.
Hrm, looking back through my code, it looks like I’m mostly calling format() to append to an array, which of course
returnsa ::text, so no ambiguity. Guess that’s my issue.
Thanks,
David