feat: page prop now falls through (implicit access).

This commit is contained in:
Spencer Brower
2026-07-28 11:58:19 -04:00
parent 9a35fa2051
commit b81aa38c62
3 changed files with 53 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
package main
import "core:fmt"
Ctx :: struct {
title: string,
using page: Page,
site: Site,
}
Page :: struct {
title: string,
}
Site :: struct {
title: string,
}
main :: proc() {
site := Ctx {
site = Site{title = "foo"},
page = Page{title = "bar"},
}
fmt.printfln("%+v", site)
fmt.printf("%+v", site)
}