-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDScript: Fix autocompletion issues with nested types
- Loading branch information
1 parent
3978628
commit 5e5a4aa
Showing
19 changed files
with
291 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
modules/gdscript/tests/scripts/completion/class_a.notest.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
modules/gdscript/tests/scripts/completion/class_b.notest.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
extends Node | ||
class_name B | ||
|
||
class InnerB: | ||
class InnerInnerB: | ||
enum EnumOfInnerInnerB { | ||
ENUM_VALUE_1, | ||
ENUM_VALUE_2, | ||
} | ||
|
||
enum EnumOfInnerB { | ||
ENUM_VALUE_1, | ||
ENUM_VALUE_2, | ||
} | ||
|
||
signal signal_of_inner_b | ||
var property_of_inner_b | ||
func func_of_inner_b(): | ||
pass | ||
|
||
enum EnumOfB { | ||
ENUM_VALUE_1, | ||
ENUM_VALUE_2, | ||
} | ||
|
||
signal signal_of_b | ||
|
||
var property_of_b | ||
|
||
func func_of_b(): | ||
pass |
21 changes: 21 additions & 0 deletions
21
modules/gdscript/tests/scripts/completion/types/hints/index_0.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[output] | ||
include=[ | ||
{"display": "A"}, | ||
{"display": "B"}, | ||
{"display": "LocalInnerClass"}, | ||
{"display": "LocalInnerEnum"}, | ||
{"display": "ConnectFlags"}, | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "float"}, | ||
{"display": "Vector2"}, | ||
{"display": "Vector3"}, | ||
{"display": "Vector4"}, | ||
{"display": "Node"}, | ||
{"display": "Node2D"}, | ||
] | ||
exclude=[ | ||
{"display": "AInner"}, | ||
{"display": "LocalInnerInnerEnum"}, | ||
{"display": "LocalInnerInnerClass"}, | ||
] |
11 changes: 11 additions & 0 deletions
11
modules/gdscript/tests/scripts/completion/types/hints/index_0.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
class LocalInnerClass: | ||
const AInner = preload("res://completion/class_a.notest.gd") | ||
enum LocalInnerInnerEnum {} | ||
class LocalInnerInnerClass: | ||
pass | ||
|
||
enum LocalInnerEnum {} | ||
|
||
var test_var: A➡ |
19 changes: 19 additions & 0 deletions
19
modules/gdscript/tests/scripts/completion/types/hints/index_0_inner_class.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[output] | ||
include=[ | ||
{"display": "A"}, | ||
{"display": "AInner"}, | ||
{"display": "B"}, | ||
{"display": "LocalInnerClass"}, | ||
{"display": "LocalInnerInnerClass"}, | ||
{"display": "LocalInnerEnum"}, | ||
{"display": "LocalInnerInnerEnum"}, | ||
{"display": "ConnectFlags"}, | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "float"}, | ||
{"display": "Vector2"}, | ||
{"display": "Vector3"}, | ||
{"display": "Vector4"}, | ||
{"display": "Node"}, | ||
{"display": "Node2D"}, | ||
] |
10 changes: 10 additions & 0 deletions
10
modules/gdscript/tests/scripts/completion/types/hints/index_0_inner_class.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
class LocalInnerClass: | ||
const AInner = preload("res://completion/class_a.notest.gd") | ||
enum LocalInnerInnerEnum {} | ||
class LocalInnerInnerClass: | ||
pass | ||
var test_var: A➡ | ||
|
||
enum LocalInnerEnum {} |
12 changes: 12 additions & 0 deletions
12
modules/gdscript/tests/scripts/completion/types/hints/index_1_global_class.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[output] | ||
include=[ | ||
{"display": "InnerB"}, | ||
{"display": "EnumOfB"}, | ||
{"display": "ConnectFlags"}, | ||
] | ||
exclude=[ | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "Node2D"}, | ||
{"display": "B"}, | ||
] |
1 change: 1 addition & 0 deletions
1
modules/gdscript/tests/scripts/completion/types/hints/index_1_global_class.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var test_var: B.➡ |
12 changes: 12 additions & 0 deletions
12
modules/gdscript/tests/scripts/completion/types/hints/index_1_local_class.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[output] | ||
include=[ | ||
{"display": "InnerInnerClass"}, | ||
{"display": "InnerInnerEnum"}, | ||
{"display": "ConnectFlags"}, | ||
] | ||
exclude=[ | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "Node2D"}, | ||
{"display": "B"}, | ||
] |
8 changes: 8 additions & 0 deletions
8
modules/gdscript/tests/scripts/completion/types/hints/index_1_local_class.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
class LocalInnerClass: | ||
class InnerInnerClass: | ||
pass | ||
enum InnerInnerEnum {} | ||
|
||
var test_var: LocalInnerClass.➡ |
11 changes: 11 additions & 0 deletions
11
modules/gdscript/tests/scripts/completion/types/hints/index_1_local_enum.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[output] | ||
exclude=[ | ||
{"display": "TEST_LOCAL_VAL"}, | ||
{"display": "ConnectFlags"}, | ||
] | ||
exclude=[ | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "Node2D"}, | ||
{"display": "B"}, | ||
] |
7 changes: 7 additions & 0 deletions
7
modules/gdscript/tests/scripts/completion/types/hints/index_1_local_enum.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
enum LocalInnerEnum { | ||
TEST_LOCAL_VAL, | ||
} | ||
|
||
var test_var: LocalInnerEnum.➡ |
12 changes: 12 additions & 0 deletions
12
modules/gdscript/tests/scripts/completion/types/hints/index_1_preload.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[output] | ||
include=[ | ||
{"display": "InnerA"}, | ||
{"display": "EnumOfA"}, | ||
{"display": "ConnectFlags"}, | ||
] | ||
exclude=[ | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "Node2D"}, | ||
{"display": "B"}, | ||
] |
3 changes: 3 additions & 0 deletions
3
modules/gdscript/tests/scripts/completion/types/hints/index_1_preload.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
var test_var: A.➡ |
19 changes: 19 additions & 0 deletions
19
modules/gdscript/tests/scripts/completion/types/hints/index_2.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[output] | ||
include=[ | ||
{"display": "AInnerInner"}, | ||
{"display": "InnerInnerInnerEnum"}, | ||
{"display": "InnerInnerInnerClass"}, | ||
{"display": "ConnectFlags"}, | ||
] | ||
exclude=[ | ||
{"display": "A"}, | ||
{"display": "AInner"}, | ||
{"display": "TestEnum"}, | ||
{"display": "InnerInnerEnum"}, | ||
{"display": "InnerInnerClass"}, | ||
{"display": "LocalInnerClass"}, | ||
{"display": "int"}, | ||
{"display": "String"}, | ||
{"display": "Node2D"}, | ||
{"display": "B"}, | ||
] |
14 changes: 14 additions & 0 deletions
14
modules/gdscript/tests/scripts/completion/types/hints/index_2.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const A = preload("res://completion/class_a.notest.gd") | ||
|
||
class LocalInnerClass: | ||
const AInner = preload("res://completion/class_a.notest.gd") | ||
class InnerInnerClass: | ||
const AInnerInner = preload("res://completion/class_a.notest.gd") | ||
enum InnerInnerInnerEnum {} | ||
class InnerInnerInnerClass: | ||
pass | ||
enum InnerInnerEnum {} | ||
|
||
enum TestEnum {} | ||
|
||
var test_var: LocalInnerClass.InnerInnerClass.➡ |
Oops, something went wrong.