Skip to content

Fix subclass check when working with shallow scripts#119592

Open
Shadows-of-Fire wants to merge 1 commit into
godotengine:masterfrom
Shadows-of-Fire:dict-types
Open

Fix subclass check when working with shallow scripts#119592
Shadows-of-Fire wants to merge 1 commit into
godotengine:masterfrom
Shadows-of-Fire:dict-types

Conversation

@Shadows-of-Fire
Copy link
Copy Markdown
Contributor

This fixes an issue with type resolution that triggers when the scripts at play are shallow, meaning the compilation pass has not been run and GDScript#base has not been populated yet. The existing logic relies on GDScript#base for validation, which (obviously) fails for shallow scripts. This adds a FQCN-based fallback path for shallow script uses.

Closes #101925

This fixes an issue with type resolution that triggers when the scripts at play are shallow, meaning the compilation pass has not been run and GDScript#base has not been populated yet. The existing logic relies on GDScript#base for validation, which (obviously) fails for shallow scripts. This adds a FQCN-based fallback path for shallow script uses.

Closes godotengine#101925
@Shadows-of-Fire Shadows-of-Fire requested review from a team as code owners May 20, 2026 04:26
@AThousandShips AThousandShips added this to the 4.x milestone May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typed Dictionary cannot use subclass of type in key with Invalid index type for a base type

3 participants