-
-
Notifications
You must be signed in to change notification settings - Fork 849
Open
Description
package main
import "core:fmt"
S :: struct #all_or_none { a, b: int }
S2 :: struct { using _: S }
main :: proc() {
s := S2{a = 5}
fmt.printfln("%#v", s)
}Expected
Same error as replacing it with s := S2{S{a = 5}} instead:
Error: All or none of the fields must be assigned to a struct with '#all_or_none' applied, missing fields: ...
Actual
Compiles successfully.
Odin: dev-2025-11:56aab55d8
OS: Windows 11 Professional (version: 25H2), build 26200.7171
CPU: AMD Ryzen 7 7700 8-Core Processor
RAM: 61033 MiB
Backend: LLVM 20.1.0
Metadata
Metadata
Assignees
Labels
No labels