mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-13 23:10:54 +01:00
Update type-ascription-by-inhabitance.md
This commit is contained in:
parent
a8296aba1e
commit
ae2628783e
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ local function f(e: number | string)
|
||||||
|
|
||||||
-- Not OK
|
-- Not OK
|
||||||
noop(e :: boolean) -- (number | string) & boolean ~ never
|
noop(e :: boolean) -- (number | string) & boolean ~ never
|
||||||
|
noop(e :: never) -- (number | string) & never ~ never
|
||||||
|
|
||||||
-- Special cases
|
-- Special cases
|
||||||
noop(error("") :: string) -- OK
|
noop(error("") :: string) -- OK
|
||||||
|
|
Loading…
Add table
Reference in a new issue