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

Support sometimes aliasing unbound arrays (T[]) as T[N] #4701

Closed
ArielG-NV opened this issue Jul 22, 2024 · 0 comments · Fixed by #4744
Closed

Support sometimes aliasing unbound arrays (T[]) as T[N] #4701

ArielG-NV opened this issue Jul 22, 2024 · 0 comments · Fixed by #4744
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case. kind:enhancement a desirable new feature, option, or behavior

Comments

@ArielG-NV
Copy link
Contributor

ArielG-NV commented Jul 22, 2024

Problem:
Currently we will not compile the following code (unless hacked around).

void myFunc(int unboundArray[])
{

}

void main()
{
    int notUnboundArray[16];
    myFunc(notUnboundArray);
}

Expected behavior:
GLSL allows void myFunc(int unboundArray[]) to work like __generic<let N : int> void myFunc(int unboundArray[N]).
Slang should do the same.

@ArielG-NV ArielG-NV added kind:enhancement a desirable new feature, option, or behavior goal:forward looking Feature needed at a later date, not connected to a specific use case. labels Jul 22, 2024
@ArielG-NV ArielG-NV changed the title Support aliasing unbound arrays (T[]) as T[N] Support sometimes aliasing unbound arrays (T[]) as T[N] Jul 22, 2024
@csyonghe csyonghe self-assigned this Jul 23, 2024
@csyonghe csyonghe added this to the Q3 2024 (Summer) milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case. kind:enhancement a desirable new feature, option, or behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants