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

Incorrect Error Message for #+vet explicit-allocators Caught on Procedure Groups #5490

@dozn

Description

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

Expected

Error message explaining the allocator parameter must be explicit.

Actual

D:/Programming/odin_test/main.odin(4:6) Error: No procedures or ambiguous call for procedure group 'make' that match with the given arguments 
        _ = make([]u8, 5) 
            ^~~^ 
        Given argument types: ([]u8, untyped integer) 
Did you mean to use one of the following: 
        runtime.make_slice                 :: proc($T: typeid/[]$E, #any_int len: int, allocator := context.allocator, loc := #caller_location) -> (: T, : Allocator_Error)                       at D:/Programming/Odin/base/runtime/core_builtin.odin(344:1)
        runtime.make_dynamic_array         :: proc($T: typeid/[dynamic]$E, allocator := context.allocator, loc := #caller_location) -> (: T, : Allocator_Error)                                   at D:/Programming/Odin/base/runtime/core_builtin.odin(352:1)
        runtime.make_dynamic_array_len     :: proc($T: typeid/[dynamic]$E, #any_int len: int, allocator := context.allocator, loc := #caller_location) -> (: T, : Allocator_Error)                at D:/Programming/Odin/base/runtime/core_builtin.odin(360:1)
        runtime.make_soa_dynamic_array_len :: proc($T: typeid/#soa[dynamic]$E, #any_int length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) at D:/Programming/Odin/base/runtime/core_builtin_soa.odin(151:1)
        runtime.make_map                   :: proc($T: typeid/map[$K]$E, allocator := context.allocator, loc := #caller_location) -> (m: T)                                                       at D:/Programming/Odin/base/runtime/core_builtin.odin(391:1)
        runtime.make_map_cap               :: proc($T: typeid/map[$K]$E, #any_int capacity: int, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error)         at D:/Programming/Odin/base/runtime/core_builtin.odin(402:1)
        runtime.make_multi_pointer         :: proc($T: typeid/[^]$E, #any_int len: int, allocator := context.allocator, loc := #caller_location) -> (mp: T, err: Allocator_Error)                 at D:/Programming/Odin/base/runtime/core_builtin.odin(416:1)
        runtime.make_soa_slice             :: proc($T: typeid/#soa[]$E, #any_int length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error)        at D:/Programming/Odin/base/runtime/core_builtin_soa.odin(138:1)
        runtime.make_soa_dynamic_array     :: proc($T: typeid/#soa[dynamic]$E, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error)                       at D:/Programming/Odin/base/runtime/core_builtin_soa.odin(143:1)

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