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
[Arrays] [sigh] who the fuck thought this was a good idea... #880
Comments
Okay so it's because of repeated call to findCommonRoot |
Okay so it's probably the right behaviour |
I'm only mad because I lost 5 hours to this suspecting each and every part of my 3d engine and it turns out it was an ooc bug that I didn't even cause |
Okay so it's not actually the right behavior, cause it takes the last floating point type so if you have: a := [1.0f, 1.0] You get an array of doubles, but if you do a := [1.0, 1.0f] You get an array of floats, and that's because of this snippet in findCommonRoot: basic := func(t1, t2: Type) -> Type {
if(t1 equals?(type2)) return t1
if(t1 isNumericType() && t2 isNumericType()) {
// The root of an integer and a floating point type is the floating point type
if(t2 isFloatingPointType()) return t2
return t1
}
// ... and so on |
Continued in #881.. |
...to determine the type of a C array from the last element
maybe it was me. But I'm going to find out...
The text was updated successfully, but these errors were encountered: