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

Argument named in breaks the in attriute in subsequent parameters (minor QoL thing) #6318

Closed
mid78000 opened this issue Feb 7, 2025 · 0 comments · Fixed by #6347
Closed
Assignees
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang

Comments

@mid78000
Copy link

mid78000 commented Feb 7, 2025

Declaring a parameter named in seems to be legal, but it can glitch the parser:

// works
[shader("vertex")]
FragIn vert(in OtherStuff o, in VertIn in)

// does not work
[shader("vertex")]
FragIn vert(in VertIn in, in OtherStuff o)

// works (but only because AFAIK "in" is the default)
[shader("vertex")]
FragIn vert(in VertIn in, OtherStuff o)

It looks like the name of parameter n affects how the annotations (or type name?) of parameters m > n are parsed, which doesn't seem like it should be a thing since those are different categories of identifier.

Not a blocker, more a QoL thing.

@mid78000 mid78000 changed the title Argument named in breaks the in attriute in subsequent parameters Argument named in breaks the in attriute in subsequent parameters (minor QoL thing) Feb 7, 2025
@csyonghe csyonghe self-assigned this Feb 12, 2025
@csyonghe csyonghe added this to the Q1 2025 (Winter) milestone Feb 12, 2025
@csyonghe csyonghe added the goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang label Feb 12, 2025
csyonghe added a commit to csyonghe/slang that referenced this issue Feb 13, 2025
csyonghe added a commit to csyonghe/slang that referenced this issue Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants