-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Procedure declaration in defer block crashes compiler #1942
Comments
Also interesting that this gives you package main
main :: proc()
{
defer
{
foo :: proc(x: int) {return x}
foo(1)
}
} |
This begs the question, is this something we should allow in the first place?
|
I'm inclined to say no. There's no good reason If extrapolated to a larger codebase, it would also be more maintainable to enforce
|
I think many users, myself included, would have expected constant declarations But @Kelimion's arguments also make a lot of sense to me. |
The issue isn't I'm wondering what the best approach to this is. Understand that this is not a technical problem but a design problem. You could easily have as many constant value and type declarations as you want within a |
Compile following with
odin build .
You should get:
Context
The text was updated successfully, but these errors were encountered: