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
OS/device including version:
Windows 10 v190431.746
Issue description:
Usage of enums when prefaced by the class name causes circular dependencies, presumably because the script believes it's trying to load itself. Generally, paying attention to the autofill will guide users in the right direction (although it's a SUPER easy mistake to make), but when used in inner classes the autofill is explicitly wrong. Worst of all, there is no indication of illegal usage and the issue is only flagged when the script is loaded in somewhere else.
Steps to reproduce:
Simply put the following code into any project. It's so basic I haven't bothered with a project file.
# test.gd
extends Resource
class_name GeneralTest
enum TestEnum { T1, T2, T3 }
# Called when the node enters the scene tree for the first time.
func _ready():
# Works:
var whatever1 : int = TestEnum.T2
# Looks like it should work, but actually causes
# circular dependency, and gives no indication of it:
var whatever2 : int = GeneralTest.TestEnum.T2
class InnerClass:
# Works, but doesn't autocomplete, which leads user
# to not expect it to work:
var inner_whatever1 : int = TestEnum.T1
# DOES autocomplete, leading user to expect it to work,
# but actually causes circular dependency with no indication.
var inner_whatever2: int = GeneralTest.TestEnum.T1
# literally_anywhere_else.gd
extends Node
var example : GeneralTest # THIS is the line that starts complaining about circular dependencies.
The text was updated successfully, but these errors were encountered:
Godot version:
v3.2.3-stable_mono_64
OS/device including version:
Windows 10 v190431.746
Issue description:
Usage of enums when prefaced by the class name causes circular dependencies, presumably because the script believes it's trying to load itself. Generally, paying attention to the autofill will guide users in the right direction (although it's a SUPER easy mistake to make), but when used in inner classes the autofill is explicitly wrong. Worst of all, there is no indication of illegal usage and the issue is only flagged when the script is loaded in somewhere else.
Steps to reproduce:
Simply put the following code into any project. It's so basic I haven't bothered with a project file.
The text was updated successfully, but these errors were encountered: