Skip to content

typed variable declaration allows malformed syntax #245

Closed

Description

@x87

#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

Activity

  1. added
    type:bug
    priority:p1
    on Aug 30, 2023
  2. x87 commented on Aug 30, 2023

    @x87
    CollaboratorAuthor

    same problem with const declaration

    const 0 = 1
    wait 0 // guess the number?
    
  3. added this to the v3.9.0 milestone on Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p1scope:compilertype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions