From 1201dc81152e76abc5004ce4c5ba18d99b808dd9 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Thu, 11 Mar 2021 13:57:11 +0900 Subject: [PATCH] Move birthday for exception objects to the start of the except block --- src/compiler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler.c b/src/compiler.c index 2be1576..2f2529b 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -1629,6 +1629,7 @@ static void tryStatement() { current->locals[exceptionObject].name = syntheticToken("exception"); } /* Make sure we update the local name for debugging */ + current->function->localNames[localNameCount].birthday = currentChunk()->count; current->function->localNames[localNameCount].name = krk_copyString(current->locals[exceptionObject].name.start, current->locals[exceptionObject].name.length); consume(TOKEN_COLON, "Expect ':' after except.");