Odin icon indicating copy to clipboard operation
Odin copied to clipboard

`expand_values` causes error when used in `min`

Open Feoramund opened this issue 4 months ago • 0 comments

While investigating the usage of expand_values as a workaround for #4301, I found that it doesn't work for that particular case of a built-in procedure.

package main

my_min :: proc(t: ..f32) { }

main :: proc() {
	nums := [?]f32{1,2,3}

	// Error: Expected an ordered numeric type to 'min', got 'f32, f32, f32'
	a := min(expand_values(nums))

	// This is okay.
	my_min(expand_values(nums))
}

Feoramund avatar Jun 01 '25 22:06 Feoramund