mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-17 18:33:51 +01:00
Apply suggestions from code review
Co-authored-by: vegorov-rbx <75688451+vegorov-rbx@users.noreply.github.com>
This commit is contained in:
parent
d6093a80ae
commit
dbedcaacdc
1 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ end
|
||||||
```
|
```
|
||||||
has inferred type:
|
has inferred type:
|
||||||
```
|
```
|
||||||
f: (t: { p: set number, get q: number }) -> ()
|
f: (t: { set p: number, get q: number }) -> ()
|
||||||
```
|
```
|
||||||
indicating that `p` is used write-only but `q` is used read-only.
|
indicating that `p` is used write-only but `q` is used read-only.
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ contravariant. These are sometimes useful, for example:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
function move(src, tgt)
|
function move(src, tgt)
|
||||||
for i,v in ipairs(src)
|
for i,v in ipairs(src) do
|
||||||
tgt[i] = src[i]
|
tgt[i] = src[i]
|
||||||
src[i] = null
|
src[i] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue