all: various fixes for [heap]/auto-heap handling (#10033)

This commit is contained in:
Uwe Krüger 2021-05-07 14:58:48 +02:00 committed by GitHub
parent 5b4eef8010
commit d26ac5692e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 279 additions and 149 deletions

View file

@ -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()
}
}