-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDScript: Fix common mismatched external parser errors
- Loading branch information
1 parent
607b230
commit 764b639
Showing
9 changed files
with
157 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
11 changes: 11 additions & 0 deletions
11
modules/gdscript/tests/scripts/analyzer/features/external_parser.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 @@ | ||
extends "external_parser_base1.notest.gd" | ||
|
||
const External1 = preload("external_parser_script1.notest.gd") | ||
|
||
func test_external_base_parser_type_resolve(_v: TypeFromBase): | ||
pass | ||
|
||
func test(): | ||
var ext := External1.new() | ||
print(ext.array[0].test2) | ||
print(ext.get_external2().get_external3().test3) |
3 changes: 3 additions & 0 deletions
3
modules/gdscript/tests/scripts/analyzer/features/external_parser.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,3 @@ | ||
GDTEST_OK | ||
test2 | ||
test3 |
1 change: 1 addition & 0 deletions
1
modules/gdscript/tests/scripts/analyzer/features/external_parser_base1.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 @@ | ||
extends "external_parser_base2.notest.gd" |
2 changes: 2 additions & 0 deletions
2
modules/gdscript/tests/scripts/analyzer/features/external_parser_base2.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,2 @@ | ||
class TypeFromBase: | ||
pass |
6 changes: 6 additions & 0 deletions
6
modules/gdscript/tests/scripts/analyzer/features/external_parser_script1.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,6 @@ | ||
const External2 = preload("external_parser_script2.notest.gd") | ||
|
||
var array: Array[External2] = [ External2.new() ] | ||
|
||
func get_external2() -> External2: | ||
return External2.new() |
6 changes: 6 additions & 0 deletions
6
modules/gdscript/tests/scripts/analyzer/features/external_parser_script2.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,6 @@ | ||
const External3 = preload("external_parser_script3.notest.gd") | ||
|
||
var test2 := "test2" | ||
|
||
func get_external3() -> External3: | ||
return External3.new() |
1 change: 1 addition & 0 deletions
1
modules/gdscript/tests/scripts/analyzer/features/external_parser_script3.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 @@ | ||
var test3 := "test3" |