mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
allow defining methods on aliases
This commit is contained in:
parent
00ea112b66
commit
fba8443f30
3 changed files with 11 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue