You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you define a class_name and then use the same name in a variable, no shadowing error/warning is triggered. This also create some bad references (see below).
Steps to reproduce
Just do something like:
class_name Foo
extends Control
var Foo: Foo
In another script you can also do:
extends Node
var Foo: Foo #= Foo.new() # this raises an error if uncommented: Parse Error: Could not resolve member "Foo": Cyclic reference
func _ready():
Foo ## This refers to main.gd and not to the local variable
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Godot version
v4.1.stable.official [9704596]
System information
Godot v4.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 (NVIDIA; 31.0.15.3667) - Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 Threads)
Issue description
If you define a
class_name
and then use the same name in a variable, no shadowing error/warning is triggered. This also create some bad references (see below).Steps to reproduce
Just do something like:
In another script you can also do:
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: