mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-20 03:44:05 +01:00
colon to invoke methods
This commit is contained in:
parent
0cc4a86dca
commit
96611f14cb
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ end
|
|||
For instance, the `rawget` type function can be written as:
|
||||
```luau
|
||||
type function rawget(tbl, prop)
|
||||
if (~tbl.istable()) then
|
||||
if (~tbl:istable()) then
|
||||
error("First parameter of rawget is not a table!") -- fails to reduce
|
||||
end
|
||||
|
||||
return tbl.getprops()[prop.getvalue()]
|
||||
return tbl:getprops()[prop:getvalue()]
|
||||
end
|
||||
|
||||
type Person = {
|
||||
|
|
Loading…
Add table
Reference in a new issue