From f4e7b9577f234db274bebd9e04360b4f68ebbbf0 Mon Sep 17 00:00:00 2001 From: ffrostfall <80861876+ffrostfall@users.noreply.github.com> Date: Tue, 4 Feb 2025 18:57:28 -0500 Subject: [PATCH] Specify additional failure case for setmetatable --- docs/metatable-type-functions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/metatable-type-functions.md b/docs/metatable-type-functions.md index abec16f..d0e4483 100644 --- a/docs/metatable-type-functions.md +++ b/docs/metatable-type-functions.md @@ -44,6 +44,7 @@ type Identity = setmetatable<{ When a non-table type (number, boolean) is passed into the type function, it should result in an error. This includes classes. If the type is an intersection or union of tables, then the metatable should be applied to every component type. If the second argument of the type function isn't a table, then it should error. +If the first argument of `setmetatable` has a metatable with the `__metatable` field specified, then it should also report an error. ### `getmetatable` Type Function