From 9574acf7c74e52a42bbe113010af568a404ac023 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Mon, 10 May 2021 14:24:03 +0300 Subject: [PATCH] Added drawback about breaking places where we might have incorrect type pointer identity checks --- rfcs/syntax-named-function-type-args.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rfcs/syntax-named-function-type-args.md b/rfcs/syntax-named-function-type-args.md index 542c6fa4..fed2842f 100644 --- a/rfcs/syntax-named-function-type-args.md +++ b/rfcs/syntax-named-function-type-args.md @@ -52,3 +52,5 @@ Function type comparisons will ignore the argument names, this proposal doesn't Argument names require that we create unique function types even when these types are 'identical', so we can't compare types using pointer identity. This is already the case in current Luau implementation, but it might reduce the optimization opportunities in the future. + +There might also be cases of pointer identity checks that are currently hidden and named arguments might expose places where correct unification is required in the type checker.