diff --git a/readme.txt b/readme.txt index 0c1a1ec..48c08ed 100644 --- a/readme.txt +++ b/readme.txt @@ -52,6 +52,10 @@ Release notes: The problem isn't really fixed, but it will no longer corrupt your game text. + Compiler: re-fixed the obscure bug with divs and spans inside + closures, which was previously only fixed for the debugger, not + for the compiler. Oops! + Compiler: better messages when adding resource files to an .aastory file, on both success and failure diff --git a/src/parse.c b/src/parse.c index 55ee3cf..cc2a86a 100644 --- a/src/parse.c +++ b/src/parse.c @@ -1366,6 +1366,9 @@ static struct astnode *parse_expr(int parsemode, struct lexer *lexer, struct are for(i = 0; i < cl->nvar; i++) { if(!strcmp(cl->varnames[i]->name, "_")) { have_arg = 1; + } else if(cl->varnames[i]->name[0] == '*') { + // Internal variables (created via fresh_word) cannot be accessed outside the closure, so they should not be considered parameters + // We don't want them to interfere with the optimizer's analysis of whether parameters to ( invoke-closure $ $ $) are bound } else { sub = an->children[1]; an->children[1] = mkast(AN_PAIR, 2, cl->arena, orig_line);