Skip to content

Populate the type an alias names when comptime reflects the alias - #2518

Merged
bfiete merged 1 commit into
beefytech:masterfrom
jayrulez:fix/comptime-reflect-alias-target-unpopulated
Sep 21, 2026
Merged

bfiete merged 1 commit into
beefytech:masterfrom
jayrulez:fix/comptime-reflect-alias-target-unpopulated

Conversation

@jayrulez

Copy link
Copy Markdown
Contributor

CeContext::GetReflectType populated the alias and then built its type data, which reads through to the aliased type: WantsGCMarking on an alias forwards to it. In a resolve-only pass the aliased type can still be undefined at that point, which asserts in a debug build and carries on with an undefined type in a release one. Populate the target too.

Seen from an [OnCompile(.TypeInit)] generator reflecting a typealias to a function type in the IDE's background pass.

@jayrulez
jayrulez marked this pull request as draft September 20, 2026 21:59
@jayrulez
jayrulez marked this pull request as ready for review September 20, 2026 22:52
@jayrulez

Copy link
Copy Markdown
Contributor Author

Same question here @bfiete . Should I drop these tests from the PR?

@bfiete

bfiete commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Nah these are ok - they are more like proper "general" tests rather than laser-targeted tests for one specific bug.

@bfiete

bfiete commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Except now this has merge conflicts.

@jayrulez

Copy link
Copy Markdown
Contributor Author

Yeah, touched the same line as a previous. I will rebase

CeContext::GetReflectType populated the alias and then built its type
data, which reads through to the aliased type: WantsGCMarking on an
alias forwards to it. In a resolve-only pass the aliased type can still
be undefined at that point, which asserts in a debug build and carries
on with an undefined type in a release one. Populate the target too.

Seen from an [OnCompile(.TypeInit)] generator reflecting a typealias to
a function type in the IDE's background pass.
@jayrulez
jayrulez force-pushed the fix/comptime-reflect-alias-target-unpopulated branch from f12dc9c to 68422ce Compare September 21, 2026 12:47
@jayrulez

Copy link
Copy Markdown
Contributor Author

Rebased

@bfiete
bfiete merged commit 53588a1 into beefytech:master Sep 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants