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: recognize void keywords in member fn results #42

Conversation

vados-cosmonic
Copy link
Collaborator

This commit fixes an issue where void could be a return type in member functions (ex. in an Interface) and was being recognized as a type.

This leads to WIT thinking that void is a type that should have been defined elsewhere

@vados-cosmonic vados-cosmonic force-pushed the fix=recognize-void-keyword-as-member-fn-result branch from 694853a to 35ca8fe Compare March 4, 2025 15:19
@MendyBerger
Copy link
Member

@vados-cosmonic do you have any examples of WebIDL using void?

See https://webidl.spec.whatwg.org/#idl-undefined, seems like void is no longer allowed.

Note: This value was previously spelled void, and more limited in how it was allowed to be used.

@vados-cosmonic
Copy link
Collaborator Author

Yeah I had one actually in the tests -- do we want to just remove that? Can we make the parser any stricter to avoid allowing void ?

@MendyBerger
Copy link
Member

If we wanna keep closest to the spec, we should probably allow types that are named void.

@MendyBerger
Copy link
Member

If all you want is for the test to clear, than I think changing void to undefined is the right thing here.

@vados-cosmonic
Copy link
Collaborator Author

vados-cosmonic commented Mar 5, 2025

Hey thanks for the note here -- I'll change the tests, and use undefined !

[EDIT] - I can actually just completely remove void/undefined, so I did

Signed-off-by: Victor Adossi <[email protected]>
@vados-cosmonic vados-cosmonic force-pushed the fix=recognize-void-keyword-as-member-fn-result branch from 35ca8fe to 8e58c09 Compare March 5, 2025 17:22
@vados-cosmonic vados-cosmonic merged commit e521852 into wasi-gfx:main Mar 5, 2025
@vados-cosmonic vados-cosmonic deleted the fix=recognize-void-keyword-as-member-fn-result branch March 5, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants