diff --git a/src/analyzer/psi/GenericTypeInferer.v b/src/analyzer/psi/GenericTypeInferer.v index 9dc83c1a..71cf2f2a 100644 --- a/src/analyzer/psi/GenericTypeInferer.v +++ b/src/analyzer/psi/GenericTypeInferer.v @@ -5,7 +5,8 @@ import math struct GenericTypeInferer {} -fn (g &GenericTypeInferer) infer_generic_call(arg_owner GenericArgumentsOwner, params_owner GenericParametersOwner, result_type types.Type) types.Type { +fn (g &GenericTypeInferer) infer_generic_call(arg_owner GenericArgumentsOwner, params_owner GenericParametersOwner, + result_type types.Type) types.Type { generic_ts_map := g.infer_generic_ts_map(arg_owner, params_owner) return result_type.substitute_generics(generic_ts_map) } @@ -43,7 +44,8 @@ fn (g &GenericTypeInferer) infer_generic_ts_map(arg_owner GenericArgumentsOwner, return g.infer_simple_generic_ts_map(arg_owner, params_owner, map[string]types.Type{}) } -fn (g &GenericTypeInferer) infer_simple_generic_ts_map(arg_owner GenericArgumentsOwner, params_owner GenericParametersOwner, additional map[string]types.Type) map[string]types.Type { +fn (g &GenericTypeInferer) infer_simple_generic_ts_map(arg_owner GenericArgumentsOwner, params_owner GenericParametersOwner, + additional map[string]types.Type) map[string]types.Type { generic_parameters := g.generics_parameter_names(params_owner) // No data for inference, call is not generic. diff --git a/src/analyzer/psi/StubBase.v b/src/analyzer/psi/StubBase.v index 8043db9f..e4c68078 100644 --- a/src/analyzer/psi/StubBase.v +++ b/src/analyzer/psi/StubBase.v @@ -29,7 +29,8 @@ pub mut: id StubId } -pub fn new_stub_base(parent &StubElement, stub_type StubType, name string, identifier_text_range TextRange, text_range TextRange, data StubData) &StubBase { +pub fn new_stub_base(parent &StubElement, stub_type StubType, name string, identifier_text_range TextRange, + text_range TextRange, data StubData) &StubBase { mut stub_list := if parent is StubBase { if !isnil(parent.stub_list) { parent.stub_list } else { &StubList{} } } else { diff --git a/src/analyzer/psi/TypeInferer.v b/src/analyzer/psi/TypeInferer.v index 007a7c63..a6940a1f 100644 --- a/src/analyzer/psi/TypeInferer.v +++ b/src/analyzer/psi/TypeInferer.v @@ -513,7 +513,8 @@ pub fn (t &TypeInferer) infer_call_expr_type(element CallExpression) types.Type return types.unknown_type } -pub fn (t &TypeInferer) process_map_array_method_call(element FunctionOrMethodDeclaration, element_type types.FunctionType, expr CallExpression) ?types.Type { +pub fn (t &TypeInferer) process_map_array_method_call(element FunctionOrMethodDeclaration, element_type types.FunctionType, + expr CallExpression) ?types.Type { receiver_type := types.unwrap_pointer_type(element.receiver_type()) if types.is_builtin_array_type(receiver_type) { @@ -531,7 +532,8 @@ pub fn (t &TypeInferer) process_map_array_method_call(element FunctionOrMethodDe return none } -pub fn (_ &TypeInferer) process_array_method_call(element FunctionOrMethodDeclaration, element_type types.FunctionType, expr CallExpression) ?types.Type { +pub fn (_ &TypeInferer) process_array_method_call(element FunctionOrMethodDeclaration, element_type types.FunctionType, + expr CallExpression) ?types.Type { return_type := element_type.result if return_type is types.VoidPtrType { diff --git a/src/analyzer/psi/search/common.v b/src/analyzer/psi/search/common.v index 08a18beb..6a1e4f41 100644 --- a/src/analyzer/psi/search/common.v +++ b/src/analyzer/psi/search/common.v @@ -4,7 +4,8 @@ import analyzer.psi import analyzer.psi.types // is_implemented checks if the given symbol (methods and fields) implements the given interface (methods and fields). -fn is_implemented(iface_methods []psi.PsiElement, iface_fields []psi.PsiElement, symbol_methods []psi.PsiElement, symbol_fields []psi.PsiElement) bool { +fn is_implemented(iface_methods []psi.PsiElement, iface_fields []psi.PsiElement, symbol_methods []psi.PsiElement, + symbol_fields []psi.PsiElement) bool { mut symbol_methods_set := map[string]psi.FunctionOrMethodDeclaration{} for symbol_method in symbol_methods { if symbol_method is psi.FunctionOrMethodDeclaration { diff --git a/src/server/completion/providers/ReferenceCompletionProvider.v b/src/server/completion/providers/ReferenceCompletionProvider.v index 6db72055..ca0ece8d 100644 --- a/src/server/completion/providers/ReferenceCompletionProvider.v +++ b/src/server/completion/providers/ReferenceCompletionProvider.v @@ -46,7 +46,8 @@ fn (mut r ReferenceCompletionProvider) add_completion(ctx &completion.Completion } } -fn (mut r ReferenceCompletionProvider) process_fields(ctx &completion.CompletionContext, element psi.PsiElement, already_assigned []string) { +fn (mut r ReferenceCompletionProvider) process_fields(ctx &completion.CompletionContext, element psi.PsiElement, + already_assigned []string) { grand := element.parent() or { return } if grand.node.type_name != .element_list { return