Fix the actual unused variable in Parser.cpp

This commit is contained in:
Arseny Kapoulkine 2021-11-05 11:47:57 -07:00
parent b286f6b5a3
commit 6cf75db7f2

View file

@ -2379,15 +2379,12 @@ AstArray<AstTypeOrPack> Parser::parseTypeParams()
Lexeme begin = lexer.current(); Lexeme begin = lexer.current();
nextLexeme(); nextLexeme();
bool seenPack = false;
while (true) while (true)
{ {
if (FFlag::LuauParseTypePackTypeParameters) if (FFlag::LuauParseTypePackTypeParameters)
{ {
if (shouldParseTypePackAnnotation(lexer)) if (shouldParseTypePackAnnotation(lexer))
{ {
seenPack = true;
auto typePack = parseTypePackAnnotation(); auto typePack = parseTypePackAnnotation();
if (FFlag::LuauTypeAliasPacks) // Type packs are recorded only is we can handle them if (FFlag::LuauTypeAliasPacks) // Type packs are recorded only is we can handle them
@ -2399,8 +2396,6 @@ AstArray<AstTypeOrPack> Parser::parseTypeParams()
if (typePack) if (typePack)
{ {
seenPack = true;
if (FFlag::LuauTypeAliasPacks) // Type packs are recorded only is we can handle them if (FFlag::LuauTypeAliasPacks) // Type packs are recorded only is we can handle them
parameters.push_back({{}, typePack}); parameters.push_back({{}, typePack});
} }