-
Notifications
You must be signed in to change notification settings - Fork 299
Fix #6544: Properly format nested type names in extensions #6769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #6544: Properly format nested type names in extensions #6769
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- source/slang/slang-ast-type.cpp: Language not supported
01f572b
to
8f85ffd
Compare
Is there an issue number associated with this? |
This would require update of pypi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes since I think it is incorrect to drop declref info in toText
.
Modify DeclRefBase::toText to properly handle types defined in extensions by qualifying them with their parent type name. This ensures getFullName() returns the full name like 'FullPrecisionOptimizer<half>.State' instead of just '.State'. Also handle other nested types in structs/classes similarly.
- stopping namespace inclusion for extension members - Update to use getTargetType() to handle the generic arguments - update test cases
8f85ffd
to
3093c2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice in future to split up really large tests like this so that each file tests exactly one thing
shader-slang#6769) * Fix shader-slang#6544: Properly format nested type names in extensions Modify DeclRefBase::toText to properly handle types defined in extensions by qualifying them with their parent type name. This ensures getFullName() returns the full name like 'FullPrecisionOptimizer<half>.State' instead of just '.State'. Also handle other nested types in structs/classes similarly. * Update extension reflection handling - with generics args and namespaces - stopping namespace inclusion for extension members - Update to use getTargetType() to handle the generic arguments - update test cases * Simplify code to remove using parentDecl
Modify DeclRefBase::toText to properly handle types defined in extensions by qualifying them with their parent type name. This ensures getFullName() returns the full name like 'FullPrecisionOptimizer.State' instead of just '.State'.
Also add diagnostic tests for the same