Struct fields of external objects are not parsed
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 50/100
Research direction
Start with the parser error and the minimal reproduction project linked in the issue; reproduce the access to ref_class.struct_var when the struct is defined in another class. Trace the parser's external class resolution while resolving struct fields. Done means the access parses without requiring a separate variable of the same struct type.
Written by the indexing model from the issue text.
Description
Tested versions
v26.3.stable.official [85e520394]
System information
Redot v26.3.stable - Devuan GNU/Linux 6 (excalibur) 6 on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA RTX 500 Ada Generation Laptop GPU (nvidia) - Intel(R) Core(TM) Ultra 5 135H (18 threads) - 15.08 GiB memory
Issue description
When a class attempts to access a struct field of an object of another class, the editor throws a parser error:
Error at (11, 11): Parser bug (please report): Could not find external parser for class "res://<script>.gd". (Trying to resolve struct field)
This can be worked around by declaring a variable of the same struct type anywhere in the referencing class
Steps to reproduce
- Define a
MyStructstruct - Define a
MyClassclass with astruct_varvariable of theMyStructtype - Define a
ReferencingClassclass with aref_classvariable of theMyClassclass - Attempt to access
ref_class.struct_varanywhere in theReferencingClasscode
Workaround:
- Declare a separate variable of the
MyStructtype anywhere in theReferencingClassclass
Minimal reproduction project (MRP)
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 337
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Redot-Engine/redot-engine
-
bug confirmed topic:3d topic:rendering
Difficulty 5/5 Over a week Newbie friendliness 35/100
Redot-Engine/redot-engine#1568 ·
Maintainers usually reply within 1 day
-
bug enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
Redot-Engine/redot-engine#1559 ·
Maintainers usually reply within 1 day
-
Classes Implementing a trait throw errors from lines that don't existPossibly taken @DuBearte claimed this 2 days ago. Openbug topic:gdscript usability
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Redot-Engine/redot-engine#1557 ·
Maintainers usually reply within 1 day
-
bug topic:worldscape usability
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Redot-Engine/redot-engine#1556 · 3 comments ·
Maintainers usually reply within 1 day
-
bug topic:3d topic:editor usability
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Redot-Engine/redot-engine#1554 ·
Maintainers usually reply within 1 day
All issues in Redot-Engine/redot-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA-Omniverse/PhysX#590 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/rocketmq-clients#1469 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
compiler-explorer/compiler-explorer#9402 ·
Maintainers usually reply within 1 day
-
自定义颜色添加为常用颜色Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mg-chao/snow-apps#2227 · 2 comments ·
Maintainers usually reply within 1 day