-
-
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.
Merge pull request #94327 from HolonProduction/underscore_identifier
GDScript: Restore support for `Token::UNDERSCORE` in identifiers
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
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
15 changes: 15 additions & 0 deletions
15
modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.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,15 @@ | ||
extends Node | ||
|
||
func test() -> void: | ||
var node1 := Node.new() | ||
node1.name = "_" | ||
var node2 := Node.new() | ||
node2.name = "Child" | ||
var node3 := Node.new() | ||
node3.name = "Child" | ||
|
||
add_child(node1) | ||
node1.add_child(node2) | ||
add_child(node3) | ||
|
||
assert(get_node("_/Child") == $_/Child) |
1 change: 1 addition & 0 deletions
1
modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.out
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 @@ | ||
GDTEST_OK |