From 808c7453a4669b8c5b6482f66ea86f4e67674b5c Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 19 Jan 2016 15:53:13 +0300 Subject: [PATCH] Added test for 'typealias' being keyword --- compiler/testData/psi/TypealiasIsKeyword.kt | 1 + compiler/testData/psi/TypealiasIsKeyword.txt | 16 ++++++++++++++++ .../kotlin/parsing/ParsingTestGenerated.java | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100644 compiler/testData/psi/TypealiasIsKeyword.kt create mode 100644 compiler/testData/psi/TypealiasIsKeyword.txt diff --git a/compiler/testData/psi/TypealiasIsKeyword.kt b/compiler/testData/psi/TypealiasIsKeyword.kt new file mode 100644 index 00000000000..488f434ac82 --- /dev/null +++ b/compiler/testData/psi/TypealiasIsKeyword.kt @@ -0,0 +1 @@ +val typealias = 0 \ No newline at end of file diff --git a/compiler/testData/psi/TypealiasIsKeyword.txt b/compiler/testData/psi/TypealiasIsKeyword.txt new file mode 100644 index 00000000000..0ee571b708e --- /dev/null +++ b/compiler/testData/psi/TypealiasIsKeyword.txt @@ -0,0 +1,16 @@ +JetFile: TypealiasIsKeyword.kt + PACKAGE_DIRECTIVE + + IMPORT_LIST + + PROPERTY + PsiElement(val)('val') + PsiErrorElement:Expecting property name or receiver type + + PsiWhiteSpace(' ') + PsiErrorElement:Property getter or setter expected + PsiElement(typealias)('typealias') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + PsiElement(INTEGER_LITERAL)('0') \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java index 4958ddf4f54..905f53ff5cf 100644 --- a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java @@ -739,6 +739,12 @@ public class ParsingTestGenerated extends AbstractParsingTest { doParsingTest(fileName); } + @TestMetadata("TypealiasIsKeyword.kt") + public void testTypealiasIsKeyword() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypealiasIsKeyword.kt"); + doParsingTest(fileName); + } + @TestMetadata("When.kt") public void testWhen() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/When.kt");