Skip to content

#all_or_none Not Working With using #5947

@dozn

Description

@dozn
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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions