We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Repro code:
#import "fmt.odin"; main :: proc() { using fmt; x := 0; Q_rsqrt_v2 := proc(num: f32) -> f32 { x := num * 0.5; y := num; i := transmute(i32)y; i = 0x5f3759df - i >> 1; y = transmute(f32)i; y *= 1.5 - x * y * y; return y; }; printf("%v\n", Q_rsqrt_v2(2)); }
Generates errors:
main.odin(10:3) Redeclaration of `x` in this scope at main.odin(7:2) main.odin(10:8) Undeclared name: num main.odin(11:8) Undeclared name: num main.odin(13:3) Assignment count mismatch `1` = `0` main.odin(14:3) Assignment count mismatch `1` = `0`
Change Q_rsqrt_v2 := to Q_rsqrt_v2 :: and it works as it should.
Q_rsqrt_v2 :=
Q_rsqrt_v2 ::
The text was updated successfully, but these errors were encountered:
Fix issue #37 for procedure literal scopes
d1a0a46
Fixed!
Sorry, something went wrong.
@gingerBill Can confirm! Thank you! 👍
It was a scoping and declaration issue that I didn't handle correctly.
@gingerBill btw, feel free to change my issue's titles if they not reflect actual problems :)
No branches or pull requests
Repro code:
Generates errors:
Change
Q_rsqrt_v2 :=
toQ_rsqrt_v2 ::
and it works as it should.The text was updated successfully, but these errors were encountered: