From 17c418adce38214e06718d09849eb347d6b03878 Mon Sep 17 00:00:00 2001 From: Andy Friesen Date: Tue, 29 Mar 2022 10:59:43 -0700 Subject: [PATCH] Fix a type judgement that we wouldn't actually be able to make with this design. --- rfcs/lower-bounds-calculation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/lower-bounds-calculation.md b/rfcs/lower-bounds-calculation.md index 22445fc3..bef8d4e5 100644 --- a/rfcs/lower-bounds-calculation.md +++ b/rfcs/lower-bounds-calculation.md @@ -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 : ((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 : ((number | string) -> T...) -> ()`. ## Design