fix: resolve itable member type dependencies for Value annotations#1650
Merged
fix: resolve itable member type dependencies for Value annotations#1650
Conversation
Previously, StatementAnnotation::Value only inserted a shallow Dependency::Datatype for the resulting type name without recursively resolving its member types via get_datatype_dependencies. This caused multi-file compilation to fail with 'Unknown type: ____itable_<I>_<M>' when a non-implementing FB that consumes an interface (holds it as a member, calls methods on it) was in a separate file from both the interface definition and any implementor. The itable struct types and their function pointer members were never added to the dependency set for the consumer's compilation unit, so codegen could not find them. This is the itable analogue of the vtable dependency fix in #1535. Fixes #1649
mhasel
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, StatementAnnotation::Value only inserted a shallow Dependency::Datatype for the resulting type name without recursively resolving its member types via get_datatype_dependencies. This caused multi-file compilation to fail with ´Unknown type: __itable´ when a non-implementing FB that consumes an interface (holds it as a member, calls methods on it) was in a separate file from both the interface definition and any implementor.
The itable struct types and their function pointer members were never added to the dependency set for the consumer's compilation unit, so codegen could not find them.
This is the itable analogue of the vtable dependency fix in #1535.
Fixes #1649