mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: various fixes for [heap]/auto-heap handling (#10033)
This commit is contained in:
@ -94,7 +94,7 @@ pub fn (mut cmd Command) add_command(command Command) {
|
||||
println('Command with the name `$subcmd.name` already exists')
|
||||
exit(1)
|
||||
}
|
||||
subcmd.parent = cmd
|
||||
subcmd.parent = unsafe { cmd }
|
||||
cmd.commands << subcmd
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ pub fn (mut cmd Command) add_command(command Command) {
|
||||
// is linked as a chain.
|
||||
pub fn (mut cmd Command) setup() {
|
||||
for mut subcmd in cmd.commands {
|
||||
subcmd.parent = cmd
|
||||
subcmd.parent = unsafe { cmd }
|
||||
subcmd.setup()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user