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

typed variable declaration allows malformed syntax #245

Closed
3 tasks done
Tracked by #231
x87 opened this issue Aug 30, 2023 · 1 comment
Closed
3 tasks done
Tracked by #231

typed variable declaration allows malformed syntax #245

x87 opened this issue Aug 30, 2023 · 1 comment
Labels
priority:p1 High Priority scope:compiler type:bug Something isn't working
Milestone

Comments

@x87
Copy link
Collaborator

x87 commented Aug 30, 2023

#32

int int int
int = x
int = float
int 0 <------------- this is sick. the compiler will replace any 0 in code with the variable
int x > 5

should error under the following rules:

  • variable name can not match reserved words
  • the type must be followed by a valid identifier (numbers or math symbols are not allowed)
  • only = is allowed in initialization part
@x87 x87 added type:bug Something isn't working priority:p1 High Priority scope:compiler labels Aug 30, 2023
@x87
Copy link
Collaborator Author

x87 commented Aug 30, 2023

same problem with const declaration

const 0 = 1
wait 0 // guess the number?

@x87 x87 mentioned this issue Aug 30, 2023
46 tasks
@x87 x87 added this to the v3.9.0 milestone Sep 5, 2023
@x87 x87 closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p1 High Priority scope:compiler type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant