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

allow defining methods on aliases

This commit is contained in:
Alexander Medvednikov
2019-07-10 14:18:21 +02:00
parent 00ea112b66
commit fba8443f30
3 changed files with 11 additions and 12 deletions

View File

@ -258,18 +258,17 @@ if parent == 'array' {
pkg = 'builtin'
}
*/
datyp := Type {
t.types << Type {
name: typ
parent: parent
//mod: mod
}
t.types << datyp
}
fn (t mut Table) register_type2(typ Type) {
if typ.name.len == 0 {
return
}
// println('register type2 $typ.name')
for typ2 in t.types {
if typ2.name == typ.name {
return