Skip to content
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 partial inference of variadic generic functions. #4956

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

csyonghe
Copy link
Collaborator

Closes #4954.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Aug 28, 2024
Copy link
Collaborator

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

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

Looks good to me.

T test<T:IInteger, each U : IInteger>(T t, expand each U u)
{
int v = 1;
expand aggregate(v, (each u).toInt());
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is very interesting way of using expend. I guess I didn't understood well enough about how expand was designed.

@@ -220,7 +222,7 @@ interface __BuiltinSignedArithmeticType : __BuiltinArithmeticType {}
/// A type that can represent integers
[sealed]
[builtin]
interface __BuiltinIntegerType : __BuiltinArithmeticType
interface __BuiltinIntegerType : __BuiltinArithmeticType, IInteger
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering about this when I was drawing a hierarchy diagram.
#4196 (comment)

@csyonghe csyonghe merged commit 6e32976 into shader-slang:master Aug 29, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Partial generic argument inference doesn't work with variadic generics.
2 participants