mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-07 20:30:53 +01:00
Update Parser.cpp
This commit is contained in:
parent
6bfc38e61a
commit
eae5989abb
1 changed files with 1 additions and 1 deletions
|
@ -1463,7 +1463,7 @@ std::pair<Location, AstTypeList> Parser::parseReturnType()
|
||||||
if (lexer.current().type != Lexeme::SkinnyArrow && resultNames.empty())
|
if (lexer.current().type != Lexeme::SkinnyArrow && resultNames.empty())
|
||||||
{
|
{
|
||||||
// If it turns out that it's just '(A)', it's possible that there are unions/intersections to follow, so fold over it.
|
// If it turns out that it's just '(A)', it's possible that there are unions/intersections to follow, so fold over it.
|
||||||
if (result.size() == 1)
|
if (result.size() == 1 && !varargAnnotation)
|
||||||
{
|
{
|
||||||
AstType* returnType = parseTypeSuffix(result[0], innerBegin);
|
AstType* returnType = parseTypeSuffix(result[0], innerBegin);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue