Valid and Invalid declarations comment for built-in functions is a bit misleading #2934
Labels
copyediting
Pure editorial stuff (copyediting, *.bs file syntax, etc.)
wgsl:declarations
wgsl
WebGPU Shading Language Issues
Milestone
In the
Example: Valid and invalid Declarations
we say:According to the prose above:
The comment in the example implies you can never reuse a built-in function name. But, from the prose, the end scope of a built-in is the end of the module, so as long as I'm not at module scope I should be able to do:
and have that be valid and any references to
modf
would refer to the variable.The first example should be updated to specify you cannot reuse at module scope and an example of re-using a built-in function name at function scope added to show it's allowed.
The text was updated successfully, but these errors were encountered: