mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix a type judgement that we wouldn't actually be able to make with this design.
This commit is contained in:
parent
96449acecb
commit
17c418adce
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ end
|
|||
|
||||
There is nothing wrong with the implementation of `foo` here, but Luau fails to typecheck it all the same because `f` is used in an inconsistent way. This too can be worked around by introducing a type annotation for `f`.
|
||||
|
||||
We would like to infer `f : <T...>((number) -> T... & (string) -> T...) -> ()`
|
||||
The fact that the return type of `f` is never used confounds things a little, but for now it would be a big improvement if we inferred `f : <T...>((number | string) -> T...) -> ()`.
|
||||
|
||||
## Design
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue