Do not offer completion for function labels

This commit is contained in:
Luuk de Gram 2021-03-12 11:56:51 +01:00
parent 7a2cd418a8
commit 0d85668ce4
No known key found for this signature in database
GPG Key ID: A002B174963DBB7D

View File

@ -1285,9 +1285,13 @@ pub fn getFieldAccessType(
.period => { .period => {
const after_period = tokenizer.next(); const after_period = tokenizer.next();
switch (after_period.tag) { switch (after_period.tag) {
.eof => return FieldAccessReturn{ .eof => {
.original = current_type, // function labels cannot be dot accessed
.unwrapped = try resolveDerefType(store, arena, current_type, &bound_type_params), if (current_type.isFunc()) return null;
return FieldAccessReturn{
.original = current_type,
.unwrapped = try resolveDerefType(store, arena, current_type, &bound_type_params),
};
}, },
.identifier => { .identifier => {
if (after_period.loc.end == tokenizer.buffer.len) { if (after_period.loc.end == tokenizer.buffer.len) {