Skip to content

Cannot convert untyped value 10 to #simd[4]f32 from untyped integer #4388

Open
@DragosPopse

Description

@DragosPopse
Odin:    dev-2024-09:8371ef668
        OS:      Windows 11 Professional (version: 23H2), build 22631.4317
        CPU:     AMD Ryzen 9 7900X 12-Core Processor
        RAM:     64661 MiB
        Backend: LLVM 18.1.8
package main
main :: proc() {
	a: #simd[4]f32 = 10
}

gives the compile error simd.odin(4:19) Error: Cannot convert untyped value '10' to '#simd[4]f32' from 'untyped integer'

changing the code to

package main
main :: proc() {
	a: #simd[4]f32 = f32(10)
}

compiles succesfuly
Overview says that T -> #simd[N]T is an allowed implicit conversion

is the "untyped integer" conversion failure intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions