Open
Description
Bug Report
Assuming the following definitions:
@[Link("pipewire-0.3")]
lib LibPipewire
type Properties = Void
fun pw_properties_new(key : LibC::Char*, ...) : Properties*
end
Calling
LibPipewire.pw_properties_new(*["foo", "bar", "baz"].map(&.to_unsafe), nil)
yields
Error: BUG: splat expects a tuple, not Array(Pointer(UInt8))
When compiling.
I'd expect that to work, because the whole point of variadic functions is to be able to be called by a variable amount of arguments.
EDIT: Ok so perhaps it shouldn't work, due to general limitations of splatting arrays into functions, but it should probably not emit BUG.
- Include Crystal compiler version (
crystal -v
) and OS. If possible, try to see if the bug still reproduces on master.
Crystal 1.14.0 [dacd97b] (2024-10-09)
LLVM: 18.1.6
Default target: x86_64-unknown-linux-gnu
Linux 6.11.0-1007, Ubuntu