mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-04 10:50:54 +01:00
spelling: function
This commit is contained in:
parent
86715a01b1
commit
edb144cd0a
3 changed files with 3 additions and 3 deletions
|
@ -412,7 +412,7 @@ void TypeChecker::checkBlock(const ScopePtr& scope, const AstStatBlock& block)
|
|||
// ```
|
||||
// These both call each other, so `f` will be ordered before `g`, so the call to `g`
|
||||
// is typechecked before `g` has had its body checked. For this reason, there's three
|
||||
// types for each functuion: before its body is checked, during checking its body,
|
||||
// types for each function: before its body is checked, during checking its body,
|
||||
// and after its body is checked.
|
||||
//
|
||||
// We currently treat the before-type and the during-type as the same,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
/* results from luaD_precall */
|
||||
#define PCRLUA 0 /* initiated a call to a Lua function */
|
||||
#define PCRC 1 /* did a call to a C function */
|
||||
#define PCRYIELD 2 /* C funtion yielded */
|
||||
#define PCRYIELD 2 /* C function yielded */
|
||||
|
||||
/* type of protected functions, to be ran by `runprotected' */
|
||||
typedef void (*Pfunc)(lua_State* L, void* ud);
|
||||
|
|
|
@ -4885,7 +4885,7 @@ f(function(a) return a.x + a.y end)
|
|||
|
||||
LUAU_REQUIRE_NO_ERRORS(result);
|
||||
|
||||
// An optional funciton is accepted, but since we already provide a function, nil can be ignored
|
||||
// An optional function is accepted, but since we already provide a function, nil can be ignored
|
||||
result = check(R"(
|
||||
type Table = { x: number, y: number }
|
||||
local function f(a: ((Table) -> number)?) if a then return a({x = 1, y = 2}) else return 0 end end
|
||||
|
|
Loading…
Add table
Reference in a new issue