Set TLC functionType sooner
This commit is contained in:
parent
fb75434cba
commit
07e3604a8c
@ -202,7 +202,6 @@ AST *nct_parse_expression(Parser *P, int lOP) {
|
|||||||
P->isInFunction++;
|
P->isInFunction++;
|
||||||
|
|
||||||
e->chunk = (AST*) nct_parse_chunk(P, 1, 0, scope_new(P->scope), ft);
|
e->chunk = (AST*) nct_parse_chunk(P, 1, 0, scope_new(P->scope), ft);
|
||||||
e->chunk->chunk.functionType = ft;
|
|
||||||
|
|
||||||
P->isInFunction--;
|
P->isInFunction--;
|
||||||
|
|
||||||
@ -1642,6 +1641,8 @@ ASTChunk *nct_parse_chunk(Parser *P, int isTopLevel, int varPrioritize, Scope *t
|
|||||||
|
|
||||||
/* Arguments */
|
/* Arguments */
|
||||||
if(ft && isTopLevel) {
|
if(ft && isTopLevel) {
|
||||||
|
P->topLevel->functionType = ft;
|
||||||
|
|
||||||
ScopeItem **vtes = alloca(sizeof(*vtes) * ft->function.argCount);
|
ScopeItem **vtes = alloca(sizeof(*vtes) * ft->function.argCount);
|
||||||
|
|
||||||
// First arguments in a function TLC is the arguments
|
// First arguments in a function TLC is the arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user