mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Specify additional failure case for setmetatable
This commit is contained in:
parent
71b58dc82d
commit
f4e7b9577f
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue