mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vet: fix vet documentation error for methods with generics (#18464)
This commit is contained in:
parent
34163ae44b
commit
75f325b950
@ -0,0 +1,2 @@
|
|||||||
|
// my_generic_method this is a documentation of my method
|
||||||
|
pub fn my_generic_method[T](value T) {}
|
@ -153,7 +153,8 @@ fn (mut vt Vet) vet_fn_documentation(lines []string, line string, lnumber int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tokens.len > 0 {
|
if tokens.len > 0 {
|
||||||
return tokens[0].all_before('(')
|
function_name_with_generic_parameters := tokens[0].all_before('(')
|
||||||
|
return function_name_with_generic_parameters.all_before('[')
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user