No duplicate "Expecting ')'" when parsing accessor
This commit is contained in:
@@ -1320,8 +1320,12 @@ public class JetParsing extends AbstractJetParsing {
|
||||
setterParameter.done(VALUE_PARAMETER);
|
||||
parameterList.done(VALUE_PARAMETER_LIST);
|
||||
}
|
||||
if (!at(RPAR)) errorUntil("Expecting ')'", TokenSet.create(RPAR, COLON, LBRACE, RBRACE, EQ, EOL_OR_SEMICOLON));
|
||||
expect(RPAR, "Expecting ')'", TokenSet.create(RPAR, COLON, LBRACE, EQ));
|
||||
if (!at(RPAR)) {
|
||||
errorUntil("Expecting ')'", TokenSet.create(RPAR, COLON, LBRACE, RBRACE, EQ, EOL_OR_SEMICOLON));
|
||||
}
|
||||
if (at(RPAR)) {
|
||||
advance();
|
||||
}
|
||||
myBuilder.restoreNewlinesState();
|
||||
|
||||
if (at(COLON)) {
|
||||
|
||||
@@ -25,7 +25,7 @@ JetFile: IncompleteAccessor1.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting ')'
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting ')'
|
||||
PsiErrorElement:Expecting function body
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
|
||||
Reference in New Issue
Block a user