Update syntax-named-function-type-returns.md

This commit is contained in:
Daniel P H Fox (Roblox) 2024-11-04 15:53:11 -08:00 committed by GitHub
parent 203d3af302
commit 8a92b3a126
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@ local function x(): (return1: number, return2: number)
This syntax is fully backwards compatible as only type names, generic names, or type packs are allowed in return position.
Broadly, return names behave identically to parameter names.
Return names are documentative - they are not identifiers that are usable in the function body.
Function type comparisons will ignore the return names, this proposal doesn't change the semantics of the language and how typechecking is performed.