Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DragosPopse opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@DragosPopse
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant