diff options
| author | ocean (they/them) <anvilfolk@gmail.com> | 2023-04-02 18:10:32 -0400 |
|---|---|---|
| committer | ocean (they/them) <anvilfolk@gmail.com> | 2023-04-02 18:30:30 -0400 |
| commit | 5d164df4e15a4e76feaa187053c05127a98225e1 (patch) | |
| tree | f5e68fc40f3a2866b597e52a601ac7f1127656f3 /modules/gdscript/tests/scripts | |
| parent | df7834ac96398da0cb6b09f77ec010d4dff467f7 (diff) | |
| download | redot-engine-5d164df4e15a4e76feaa187053c05127a98225e1.tar.gz | |
Make type not found errors more informative.
This PR removes a check for whether a datatype is a meta type when
generating a datatype's to_string() result. This means that error
messages that fail to find the type will now print their class names,
which is much more useful when trying to identify errors.
Diffstat (limited to 'modules/gdscript/tests/scripts')
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.gd | 6 | ||||
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.gd b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.gd new file mode 100644 index 0000000000..e56ae7b11d --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.gd @@ -0,0 +1,6 @@ +class InnerClass: + pass + +func test(): + var x : InnerClass.DoesNotExist + print("FAIL") diff --git a/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out new file mode 100644 index 0000000000..29c75ae3c0 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Could not find type "DoesNotExist" under base "InnerClass". |
