Stream: bugs

Topic: F32 -> llvm i128 (Dec) inference/specialization bug


view this post on Zulip Dan G Knutson (Oct 26 2024 at 16:28):

I hit what appears to be a compiler bug where inference got the wrong type for a local F32 leading to a compiler crash. Is that a known thing or should I try to make a minimal repro?

view this post on Zulip Brendan Hansknecht (Oct 26 2024 at 16:37):

I have never heard of that happening

view this post on Zulip Brendan Hansknecht (Oct 26 2024 at 16:38):

Minimal repro would be amazing

view this post on Zulip Brendan Hansknecht (Oct 26 2024 at 16:38):

Any sort of repro would be interesting

view this post on Zulip Brendan Hansknecht (Oct 26 2024 at 16:38):

Also, are you sure you had an F32 and not a Dec?

view this post on Zulip Dan G Knutson (Oct 26 2024 at 16:42):

I think I had a Dec, but expected it to be inferred F32 because I was passing it to a record that wanted an F32. It's entirely possible I'm doing something wrong.

view this post on Zulip Dan G Knutson (Oct 26 2024 at 16:44):

here's where I ran into it: https://github.com/lukewilliamboswell/roc-ray/pull/51

view this post on Zulip Brendan Hansknecht (Oct 26 2024 at 16:56):

Yeah, if you can manage any sort of minimal repro, that would be great. It seems like roc failed to specialize a function correctly. As such, it built one function with the default fractional type (Dec) and then ended up calling it with a F32.


Last updated: Jul 26 2025 at 12:14 UTC