diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java index 7550cce26da..3317753b646 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetParsing.java @@ -843,7 +843,7 @@ public class JetParsing extends AbstractJetParsing { boolean typeParametersDeclared = at(LT) && parseTypeParameterList(TokenSet.create(IDENTIFIER, EQ, COLON, SEMICOLON)); - TokenSet propertyNameFollow = TokenSet.create(COLON, EQ, LBRACE, SEMICOLON, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, CLASS_KEYWORD); + TokenSet propertyNameFollow = TokenSet.create(COLON, EQ, LBRACE, RBRACE, SEMICOLON, VAL_KEYWORD, VAR_KEYWORD, FUN_KEYWORD, CLASS_KEYWORD); myBuilder.disableJoiningComplexTokens(); diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.jet b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.jet index 8e07ef2a23b..f7e958af0be 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.jet +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.jet @@ -4,5 +4,5 @@ package kt843 fun main(args : Array) { // Integer type - val // this word is grey, which looks strange -} + val // this word is grey, which looks strange +} \ No newline at end of file diff --git a/compiler/testData/psi/recovery/kt2172.jet b/compiler/testData/psi/recovery/kt2172.jet new file mode 100644 index 00000000000..2aca156f64f --- /dev/null +++ b/compiler/testData/psi/recovery/kt2172.jet @@ -0,0 +1,6 @@ +class Foo { + + class object { + val + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java index 4af45f6bb38..35e725da975 100644 --- a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java +++ b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTest.java @@ -137,6 +137,7 @@ public class JetParsingTest extends ParsingTestCase { suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "examples", true, factory)); suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "greatSyntacticShift", true, factory)); suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "script", true, factory)); + suite.addTest(JetTestCaseBuilder.suiteForDirectory(prefix, "recovery", true, factory)); return suite; }