You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating to dev-2024-12 and then building my code. Errors showed up where I was using a named argument to specify the capacity of make when allocating a map.
Operating System & Odin Version:
Please paste odin report output:
Odin: dev-2024-12:7be003557
OS: Arch Linux ARM, Linux 6.9.3-3-MANJARO-ARM
CPU: ARM64
RAM: 3862 MiB
Backend: LLVM 18.1.8
Expected Behavior
The following code should compile completely fine:
package main
import"core:fmt"
main :: proc() {
v := make(map[string]string, capacity = 15, allocator = context.allocator)
deferdelete(v)
v["foo"] = "bar"
fmt.printfln("{}={}", "foo", v["foo"])
}
Current Behavior
But it fails with the following message:
Error: Parameter 'capacity' of type 'int' is missing in procedure call
v := make(map[string]string, capacity = 15, allocator = cont ...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
Failure Information (for bugs)
Oddly enough when using make_map_cap instead of make it works completely fine.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Build and install odin dev-2024-12´
odin run the provided code
See that it does not compile
The text was updated successfully, but these errors were encountered:
Context
When updating to
dev-2024-12
and then building my code. Errors showed up where I was using a named argument to specify the capacity of make when allocating a map.odin report
output:Odin: dev-2024-12:7be003557
OS: Arch Linux ARM, Linux 6.9.3-3-MANJARO-ARM
CPU: ARM64
RAM: 3862 MiB
Backend: LLVM 18.1.8
Expected Behavior
The following code should compile completely fine:
Current Behavior
But it fails with the following message:
Failure Information (for bugs)
Oddly enough when using
make_map_cap
instead ofmake
it works completely fine.Steps to Reproduce
Please provide detailed steps for reproducing the issue.
dev-2024-12
´odin run
the provided codeThe text was updated successfully, but these errors were encountered: