From 7819bf31c79351030bd6003c357c13f06dee0741 Mon Sep 17 00:00:00 2001 From: "ajeffrey@roblox.com" Date: Wed, 6 Apr 2022 15:07:21 -0500 Subject: [PATCH] Added comment about Instance.new --- rfcs/function-overload-resolution.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rfcs/function-overload-resolution.md b/rfcs/function-overload-resolution.md index 19a94f17..87da9793 100644 --- a/rfcs/function-overload-resolution.md +++ b/rfcs/function-overload-resolution.md @@ -138,6 +138,15 @@ In this proposal, the type of `f(x)` can depend on the type of `x`, which may ca There may be other devils in the details. +Saturation on something like the type of `Instance.new` would be horrible + +```lua + ( ("Part") -> Part + & ("Folder") -> Folder + & ("Humanoid") -> Humanoid + & ... ) +``` + ## Alternatives We could try applying fixes to the current algorithm, and live with constraint order mattering.