This project is archived. Its data is read-only.

Shadowing parameter warning

if you would define the following function on anything extending a CanvasItem

func example(visible: bool) -> void:
	if visible:
		pass

the godot editor complains with a warning

W 0:00:00:0764   The local function parameter "visible" is shadowing an already-declared property at the base class "CanvasItem".
  <GDScript Error>SHADOWED_VARIABLE_BASE_CLASS

suggestion to give a similar warning for parameters shadowing

Assignee Loading
Time tracking Loading