Differentiate Tuple / FnPtr type constructors by cardinality

This is necessary because Chalk (reasonably) expects each 'struct' to know how
many type parameters it takes.
This commit is contained in:
Florian Diebold 2019-05-04 19:07:25 +02:00
parent 19fbd91998
commit a4eb1a546c
5 changed files with 25 additions and 15 deletions

View file

@ -24,7 +24,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
}
}
// FIXME unions
TypeCtor::Tuple => {
TypeCtor::Tuple { .. } => {
for (i, ty) in a_ty.parameters.iter().enumerate() {
acc.add_pos_field(ctx, i, ty);
}