Type-checking calls in the MIR
nikomatsakis opened this issue · comments
Niko Matsakis commented
Type-checking calls: when there is a CALL in the MIR, we need to "unpack" the fn type to get to something callable. e.g. if the type of the thing-to-be-called is forall<'a> (T => F)
, then we should instantiate 'a
with an inference variable, add T
as an obligation, and finally get the signature from F
.
The callable thing should be either a fn-def type or a fn-ptr type.
We need to work out trait calls at some point too.