这是indexloc提供的服务,不要输入任何密码
Skip to content

Incorrect #+vet explicit-allocators Error When Parameter is Named with Builtin Procedures #5489

@dozn

Description

@dozn
#+vet explicit-allocators
package main
main :: proc () {
	_ = make([]u8, 5, allocator = context.allocator)
}

Expected

No error

Actual

D:/Programming/odin_test/main.odin(4:6) Error: Parameter 'allocator' of type 'Allocator' must be explicitly provided in procedure call 
        _ = make([]u8, 5, allocator = context.allocator) 
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Notes

  • works when allocator = is removed
  • appears to only occur with builtins (such as delete), and it works for other procedures (such as json.unmarshal)

Odin: dev-2025-07:19a075211
OS: Windows 11 Professional (version: 23H2), build 22631.5624
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