I see, thank you!

Do you (or anyone else) know the reason for that limitation? Is there some obvious situation where the ambiguity is preferable, versus simply inferring - or trying to infer - the expected type?

ie, superficially it seems like the compiler could say, "Hey, they are trying to use this array in the context of a [type X] argument - let's assume that for the moment, and see if it works."

Put another way, why is a function argument treated differently than the right side of an explicitly-typed variable assignment?

Reply via email to