mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
generics: generic methods, cast to T
This commit is contained in:
parent
7d02eccbce
commit
280c7d396c
4 changed files with 75 additions and 26 deletions
|
@ -1617,7 +1617,10 @@ fn (p mut Parser) name_expr() string {
|
|||
}
|
||||
p.gen('(')
|
||||
mut typ := name
|
||||
p.cast(name)
|
||||
if typ in p.cur_fn.dispatch_of.inst.keys() {
|
||||
typ = p.cur_fn.dispatch_of.inst[typ]
|
||||
}
|
||||
p.cast(typ)
|
||||
p.gen(')')
|
||||
for p.tok == .dot {
|
||||
typ = p.dot(typ, ph)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue