We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am unable to loop through SoA's that are part of a map as the compiler will not build the project. For example this will not work
map
Foo :: struct { bar: int, baz: int, } map[int]#soa[dynamic]Foo
Odin: dev-2024-11-nightly:e6475fe OS: Windows 10 Professional (version: 22H2), build 19045.5247 CPU: AMD Ryzen 9 5950X 16-Core Processor RAM: 65460 MiB Backend: LLVM 18.1.8
Normal behavior for an #soa. Looping through each field of the struct or each struct.
D:\a\Odin\Odin\src\llvm_backend_general.cpp(1338): Assertion Failure: `t->kind == Type_Struct && t->Struct.soa_kind != StructSoa_None`
If you run the following code you will see the build error
main :: proc () { Foo :: struct { id: uint, item: uint } table : map[string] (#soa[dynamic]Foo) table["key"] = make_soa_dynamic_array(#soa[dynamic]Foo) append_soa(&table["key"], Foo{ id = 0, item = uint(4) }) fmt.println("This works", table["key"].item[0]) // this works // This will fail to build for &el in table["key"] { fmt.println(el) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Context
I am unable to loop through SoA's that are part of a
map
as the compiler will not build the project.For example this will not work
Odin: dev-2024-11-nightly:e6475fe
OS: Windows 10 Professional (version: 22H2), build 19045.5247
CPU: AMD Ryzen 9 5950X 16-Core Processor
RAM: 65460 MiB
Backend: LLVM 18.1.8
Expected Behavior
Normal behavior for an #soa. Looping through each field of the struct or each struct.
Failure Information (for bugs)
Steps to Reproduce
If you run the following code you will see the build error
The text was updated successfully, but these errors were encountered: