Minor fixes

This commit is contained in:
ajeffrey@roblox.com 2023-03-15 17:59:00 -05:00
parent 5470f2a264
commit 54308d7472

View file

@ -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: following the common practice of naming the self type after the metatable:
```lua ```lua
type Set<E> = { [E] : boolean } type Set<E> = { elements : { [E] : boolean } }
``` ```
This type (and its generic type parameters) are used to derive the This type (and its generic type parameters) are used to derive the
@ -155,7 +155,7 @@ declarations:
```lua ```lua
type SetSelf<E> = { type SetSelf<E> = {
[E] : boolean, elements : { [E] : boolean },
@metatable SetMT @metatable SetMT
} }
``` ```
@ -229,7 +229,7 @@ In calls to `setmetatable(t, mt)`:
* then `setmetatable(t, mt)` has type `S [ Ts/As ]`. * then `setmetatable(t, mt)` has type `S [ Ts/As ]`.
As currently, this has a side-effect of updating the type state of `t` from 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: For example, in `setmetatable({ elements = {} }, Set)`, we have: