why is this cast required?
DanielG
simpletangent at gmail.com
Fri Sep 25 15:52:04 UTC 2026
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?
More information about the Digitalmars-d-learn
mailing list