diff --git a/rfcs/shared-self-types.md b/rfcs/shared-self-types.md index 56032c84..6c27c9d9 100644 --- a/rfcs/shared-self-types.md +++ b/rfcs/shared-self-types.md @@ -146,7 +146,7 @@ and propose allowing explicit declaration of the shared self type, following the common practice of naming the self type after the metatable: ```lua - type Set = { [E] : boolean } + type Set = { elements : { [E] : boolean } } ``` This type (and its generic type parameters) are used to derive the @@ -155,7 +155,7 @@ declarations: ```lua type SetSelf = { - [E] : boolean, + elements : { [E] : boolean }, @metatable SetMT } ``` @@ -229,7 +229,7 @@ In calls to `setmetatable(t, mt)`: * then `setmetatable(t, mt)` has type `S [ Ts/As ]`. As currently, this has a side-effect of updating the type state of `t` from -'T [ Ts/As ]` to `S [ Ts/As ]`. +`T [ Ts/As ]` to `S [ Ts/As ]`. For example, in `setmetatable({ elements = {} }, Set)`, we have: