Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
generics
/
generic_static_method_test.v
12
lines
·
10
sloc
·
182 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
SomeStruct {
2
name string
3
}
4
5
fn
SomeStruct.static_method[T]() string {
6
return
'hello'
7
}
8
9
fn
test_main() {
10
val := SomeStruct.static_method[string]()
11
assert val ==
'hello'
12
}
13