Skip to content

Fix lookup symbol for super() - #108306

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Chaosus:gds_fix_super_completion
Jul 17, 2025
Merged

Repiteo merged 1 commit into
godotengine:masterfrom
Chaosus:gds_fix_super_completion

Conversation

@Chaosus

@Chaosus Chaosus commented Jul 5, 2025

Copy link
Copy Markdown
Member

@Chaosus
Chaosus requested a review from a team as a code owner July 5, 2025 09:47
@AThousandShips AThousandShips added this to the 4.x milestone Jul 5, 2025
@Chaosus
Chaosus force-pushed the gds_fix_super_completion branch 2 times, most recently from def74d7 to 61e6789 Compare July 5, 2025 10:24
Comment thread modules/gdscript/gdscript_editor.cpp Outdated
@Chaosus
Chaosus force-pushed the gds_fix_super_completion branch 5 times, most recently from dddda6b to 1c59c85 Compare July 7, 2025 14:23
@Chaosus Chaosus changed the title Fix completion for super() Fix symbol lookup for super() Jul 7, 2025
@Chaosus
Chaosus force-pushed the gds_fix_super_completion branch from 1c59c85 to 67aef7a Compare July 7, 2025 14:25
@Chaosus Chaosus changed the title Fix symbol lookup for super() Fix lookup symbol for super() Jul 7, 2025
@Chaosus
Chaosus requested a review from HolonProduction July 7, 2025 14:53

@HolonProduction HolonProduction left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright you have convinced me. Let's add a new context type for super. The fact that we need different lookup depending on whether it is a call makes this pretty much impossible to solve without parser changes.

Comment thread modules/gdscript/gdscript_parser.h Outdated
@HolonProduction

Copy link
Copy Markdown
Member

Should have some test. We don't have a specific test suite for lookup AFAIK, but the LSP test suite uses lookup under the hood. So we should add a supper call in one of those test cases.

@Chaosus
Chaosus force-pushed the gds_fix_super_completion branch 2 times, most recently from eda6e35 to 9ce6f4e Compare July 8, 2025 13:20
@Chaosus
Chaosus requested a review from a team as a code owner July 8, 2025 13:20
@Chaosus
Chaosus force-pushed the gds_fix_super_completion branch from 9ce6f4e to c232b7c Compare July 8, 2025 13:21
@Chaosus

Chaosus commented Jul 8, 2025

Copy link
Copy Markdown
Member Author

Should have some test. We don't have a specific test suite for lookup AFAIK, but the LSP test suite uses lookup under the hood. So we should add a supper call in one of those test cases.

Done.. I think. Check it up.

@HolonProduction HolonProduction left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Calinou Calinou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and tests look good to me.

@Chaosus Chaosus modified the milestones: 4.x, 4.5 Jul 17, 2025
@Chaosus

Chaosus commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

I think it's fine to be merged to 4.5 beta milestone - it's a safe change.

@Repiteo Repiteo added the bug label Jul 17, 2025
@Repiteo
Repiteo merged commit 25dcf7d into godotengine:master Jul 17, 2025
@Repiteo

Repiteo commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

Thanks!

@Chaosus
Chaosus deleted the gds_fix_super_completion branch July 17, 2025 16:58
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026