1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

implement generic structs

This commit is contained in:
joe-conigliaro
2019-12-21 11:53:58 +11:00
committed by Alexander Medvednikov
parent b3a402eb82
commit fbd9fedbfb
11 changed files with 246 additions and 41 deletions

View File

@@ -163,7 +163,7 @@ fn (p mut Parser) gen_array_set(typ string, is_ptr, is_map bool,fn_ph, assign_po
}
// returns true in case of an early return
fn (p mut Parser) gen_struct_init(typ string, t Type) bool {
fn (p mut Parser) gen_struct_init(typ string, t &Type) bool {
p.next()
p.check(.lcbr)
ptr := typ.contains('*')