shadowed_variable_class.gd 229 B

123456789
  1. var foo = 123
  2. func test():
  3. # Notice the `var` keyword. Without this keyword, no warning would be emitted
  4. # because no new variable would be created. Instead, the class variable's value
  5. # would be overwritten.
  6. var foo = 456