Revert "'yield' reserved as a keyword"

This reverts commit 434082cadb.
This commit is contained in:
Denis Zharkov
2016-05-19 14:36:03 +03:00
parent 5c1e17c8e7
commit 20d1d12f3b
124 changed files with 1408 additions and 1404 deletions
@@ -1,4 +1,4 @@
/* The following code was generated by JFlex 1.4.3 on 4/28/16 4:31 PM */
/* The following code was generated by JFlex 1.4.3 on 5/19/16 4:06 PM */
package org.jetbrains.kotlin.kdoc.lexer;
@@ -11,10 +11,10 @@ import org.jetbrains.kotlin.kdoc.parser.KDocKnownTag;
/**
* This class is a scanner generated by
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 4/28/16 4:31 PM from the specification file
* <tt>/Users/yole/jetbrains/kotlin/compiler/frontend/src/org/jetbrains/kotlin/kdoc/lexer/KDoc.flex</tt>
* on 5/19/16 4:06 PM from the specification file
* <tt>/home/dzharkov/work/kotlin/compiler/frontend/src/org/jetbrains/kotlin/kdoc/lexer/KDoc.flex</tt>
*/
class _KDocLexer implements FlexLexer {
/** initial size of the lookahead buffer */
@@ -37,83 +37,103 @@ class _KDocLexer implements FlexLexer {
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
private static final int ZZ_LEXSTATE[] = {
0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
8, 8
};
/**
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
private static final String ZZ_CMAP_PACKED =
"\11\0\1\1\1\11\1\0\1\1\23\0\1\1\3\0\1\3\3\0"+
"\1\16\1\17\1\13\3\0\1\4\1\12\12\2\6\0\1\14\32\3"+
"\1\5\1\15\1\6\1\0\1\3\1\7\32\3\3\0\1\10\43\0"+
"\4\3\4\0\1\3\12\0\1\3\4\0\1\3\5\0\27\3\1\0"+
"\37\3\1\0\u013f\3\31\0\162\3\4\0\14\3\16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2\0\2\3\1\0\4\3\1\0\2\3\11\0\1\3\2\0"+
"\5\3\1\0\1\3\25\0\2\3\42\0\1\3\77\0\10\3\1\0"+
"\42\3\35\0\4\3\164\0\42\3\1\0\5\3\1\0\2\3\45\0"+
"\6\3\112\0\46\3\12\0\51\3\7\0\132\3\5\0\104\3\5\0"+
"\122\3\6\0\7\3\1\0\77\3\1\0\1\3\1\0\4\3\2\0"+
"\7\3\1\0\1\3\1\0\4\3\2\0\47\3\1\0\1\3\1\0"+
"\4\3\2\0\37\3\1\0\1\3\1\0\4\3\2\0\7\3\1\0"+
"\1\3\1\0\4\3\2\0\7\3\1\0\7\3\1\0\27\3\1\0"+
"\37\3\1\0\1\3\1\0\4\3\2\0\7\3\1\0\47\3\1\0"+
"\23\3\105\0\125\3\14\0\u026c\3\2\0\10\3\12\0\32\3\5\0"+
"\113\3\3\0\3\3\17\0\15\3\1\0\4\3\16\0\22\3\16\0"+
"\22\3\16\0\15\3\1\0\3\3\17\0\64\3\43\0\1\3\3\0"+
"\2\3\103\0\130\3\10\0\51\3\127\0\35\3\63\0\36\3\2\0"+
"\5\3\u038b\0\154\3\224\0\234\3\4\0\132\3\6\0\26\3\2\0"+
"\6\3\2\0\46\3\2\0\6\3\2\0\10\3\1\0\1\3\1\0"+
"\1\3\1\0\1\3\1\0\37\3\2\0\65\3\1\0\7\3\1\0"+
"\1\3\3\0\3\3\1\0\7\3\3\0\4\3\2\0\6\3\4\0"+
"\15\3\5\0\3\3\1\0\7\3\102\0\2\3\23\0\1\3\34\0"+
"\1\3\15\0\1\3\40\0\22\3\120\0\1\3\4\0\1\3\2\0"+
"\12\3\1\0\1\3\3\0\5\3\6\0\1\3\1\0\1\3\1\0"+
"\1\3\1\0\4\3\1\0\3\3\1\0\7\3\3\0\3\3\5\0"+
"\5\3\26\0\44\3\u0e81\0\3\3\31\0\11\3\7\0\5\3\2\0"+
"\5\3\4\0\126\3\6\0\3\3\1\0\137\3\5\0\50\3\4\0"+
"\136\3\21\0\30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0\103\3\45\0\20\3\20\0\125\3\14\0\u026c\3\2\0"+
"\21\3\1\0\32\3\5\0\113\3\3\0\3\3\17\0\15\3\1\0"+
"\4\3\16\0\22\3\16\0\22\3\16\0\15\3\1\0\3\3\17\0"+
"\64\3\43\0\1\3\3\0\2\3\103\0\130\3\10\0\51\3\1\0"+
"\1\3\5\0\106\3\12\0\35\3\63\0\36\3\2\0\5\3\13\0"+
"\54\3\25\0\7\3\70\0\27\3\11\0\65\3\122\0\1\3\135\0"+
"\57\3\21\0\7\3\67\0\36\3\15\0\2\3\12\0\54\3\32\0"+
"\44\3\51\0\3\3\12\0\44\3\153\0\4\3\1\0\4\3\3\0"+
"\2\3\11\0\300\3\100\0\u0116\3\2\0\6\3\2\0\46\3\2\0"+
"\6\3\2\0\10\3\1\0\1\3\1\0\1\3\1\0\1\3\1\0"+
"\37\3\2\0\65\3\1\0\7\3\1\0\1\3\3\0\3\3\1\0"+
"\7\3\3\0\4\3\2\0\6\3\4\0\15\3\5\0\3\3\1\0"+
"\7\3\102\0\2\3\23\0\1\3\34\0\1\3\15\0\1\3\20\0"+
"\15\3\3\0\33\3\107\0\1\3\4\0\1\3\2\0\12\3\1\0"+
"\1\3\3\0\5\3\6\0\1\3\1\0\1\3\1\0\1\3\1\0"+
"\4\3\1\0\13\3\2\0\4\3\5\0\5\3\4\0\1\3\21\0"+
"\51\3\u0a77\0\57\3\1\0\57\3\1\0\205\3\6\0\4\3\3\0"+
"\2\3\14\0\46\3\1\0\1\3\5\0\1\3\2\0\70\3\7\0"+
"\1\3\20\0\27\3\11\0\7\3\1\0\7\3\1\0\7\3\1\0"+
"\7\3\1\0\7\3\1\0\7\3\1\0\7\3\1\0\7\3\120\0"+
"\1\3\u01d5\0\3\3\31\0\11\3\7\0\5\3\2\0\5\3\4\0"+
"\126\3\6\0\3\3\1\0\132\3\1\0\4\3\5\0\51\3\3\0"+
"\136\3\21\0\33\3\65\0\20\3\u0200\0\u19b6\3\112\0\u51cd\3\63\0"+
"\u048d\3\103\0\56\3\2\0\u010d\3\3\0\20\3\12\0\2\3\24\0"+
"\57\3\20\0\31\3\10\0\120\3\47\0\11\3\2\0\147\3\2\0"+
"\4\3\1\0\4\3\14\0\13\3\115\0\12\3\1\0\3\3\1\0"+
"\4\3\1\0\27\3\25\0\1\3\7\0\64\3\16\0\62\3\76\0"+
"\6\3\3\0\1\3\16\0\34\3\12\0\27\3\31\0\35\3\7\0"+
"\57\3\34\0\1\3\60\0\51\3\27\0\3\3\1\0\10\3\24\0"+
"\27\3\3\0\1\3\5\0\60\3\1\0\1\3\3\0\2\3\2\0"+
"\5\3\2\0\1\3\1\0\1\3\30\0\3\3\2\0\13\3\7\0"+
"\3\3\14\0\6\3\2\0\6\3\2\0\6\3\11\0\7\3\1\0"+
"\7\3\221\0\43\3\35\0\u2ba4\3\14\0\27\3\4\0\61\3\u2104\0"+
"\u016e\3\2\0\152\3\46\0\7\3\14\0\5\3\5\0\1\3\1\0"+
"\12\3\1\0\15\3\1\0\5\3\1\0\1\3\1\0\2\3\1\0"+
"\2\3\1\0\154\3\41\0\u016b\3\22\0\100\3\2\0\66\3\50\0"+
"\15\3\66\0\2\3\30\0\3\3\31\0\1\3\6\0\5\3\1\0"+
"\207\3\7\0\1\3\34\0\32\3\4\0\1\3\1\0\32\3\13\0"+
"\131\3\3\0\6\3\2\0\6\3\2\0\6\3\2\0\3\3\3\0"+
"\2\3\3\0\2\3\31\0";
/**
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -144,7 +164,7 @@ class _KDocLexer implements FlexLexer {
}
/**
/**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -177,7 +197,7 @@ class _KDocLexer implements FlexLexer {
return j;
}
/**
/**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -345,7 +365,7 @@ class _KDocLexer implements FlexLexer {
}
/**
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -355,7 +375,7 @@ class _KDocLexer implements FlexLexer {
char [] map = new char[0x10000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
while (i < 1216) {
while (i < 1608) {
int count = packed.charAt(i++);
char value = packed.charAt(i++);
do map[j++] = value; while (--count > 0);
@@ -578,31 +598,31 @@ class _KDocLexer implements FlexLexer {
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 15:
case 15:
{ yybegin(CODE_BLOCK_LINE_BEGINNING);
return KDocTokens.TEXT;
}
case 21: break;
case 10:
case 10:
{ yybegin(CODE_BLOCK_CONTENTS_BEGINNING);
return KDocTokens.LEADING_ASTERISK;
}
case 22: break;
case 1:
case 1:
{ return TokenType.BAD_CHARACTER;
}
case 23: break;
case 14:
case 14:
{ yybegin(CONTENTS_BEGINNING);
return KDocTokens.START;
}
case 24: break;
case 2:
case 2:
{ yybegin(CONTENTS);
return KDocTokens.TEXT;
}
case 25: break;
case 20:
case 20:
// lookahead expression with fixed base length
zzMarkedPos = zzStartRead + 3;
{ // Code fence end
@@ -610,32 +630,32 @@ class _KDocLexer implements FlexLexer {
return KDocTokens.TEXT;
}
case 26: break;
case 19:
case 19:
{ yybegin(CONTENTS);
return KDocTokens.MARKDOWN_INLINE_LINK;
}
case 27: break;
case 5:
case 5:
{ yybegin(CONTENTS);
return KDocTokens.TEXT;
}
case 28: break;
case 12:
case 12:
{ yybegin(CONTENTS);
return KDocTokens.MARKDOWN_ESCAPED_CHAR;
}
case 29: break;
case 16:
case 16:
{ yybegin(TAG_TEXT_BEGINNING);
return KDocTokens.MARKDOWN_LINK;
}
case 30: break;
case 4:
case 4:
{ yybegin(CONTENTS_BEGINNING);
return KDocTokens.LEADING_ASTERISK;
}
case 31: break;
case 9:
case 9:
{ if (yytextContainLineBreaks()) {
yybegin(CODE_BLOCK_LINE_BEGINNING);
return TokenType.WHITE_SPACE;
@@ -643,7 +663,7 @@ class _KDocLexer implements FlexLexer {
return KDocTokens.CODE_BLOCK_TEXT;
}
case 32: break;
case 3:
case 3:
{ if (yytextContainLineBreaks()) {
yybegin(LINE_BEGINNING);
return TokenType.WHITE_SPACE;
@@ -653,42 +673,42 @@ class _KDocLexer implements FlexLexer {
}
}
case 33: break;
case 18:
case 18:
// lookahead expression with fixed lookahead length
yypushback(1);
{ yybegin(CONTENTS);
return KDocTokens.MARKDOWN_LINK;
}
case 34: break;
case 17:
case 17:
{ yybegin(CONTENTS);
return KDocTokens.MARKDOWN_LINK;
}
case 35: break;
case 11:
case 11:
{ if (isLastToken()) return KDocTokens.END;
else return KDocTokens.TEXT;
}
case 36: break;
case 7:
case 7:
{ yybegin(TAG_TEXT_BEGINNING);
return KDocTokens.MARKDOWN_LINK;
}
case 37: break;
case 13:
case 13:
{ KDocKnownTag tag = KDocKnownTag.Companion.findByTagName(zzBuffer.subSequence(zzStartRead, zzMarkedPos));
yybegin(tag != null && tag.isReferenceRequired() ? TAG_BEGINNING : TAG_TEXT_BEGINNING);
return KDocTokens.TAG_NAME;
}
case 38: break;
case 6:
case 6:
{ if (yytextContainLineBreaks()) {
yybegin(LINE_BEGINNING);
}
return TokenType.WHITE_SPACE;
}
case 39: break;
case 8:
case 8:
{ yybegin(CODE_BLOCK);
return KDocTokens.CODE_BLOCK_TEXT;
}
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.lexer.KtTokens;
private final Stack<State> states = new Stack<State>();
private int lBraceCount;
private int commentStart;
private int commentDepth;
@@ -246,7 +246,6 @@ LONG_TEMPLATE_ENTRY_START=\$\{
"throw" { return KtTokens.THROW_KEYWORD ;}
"false" { return KtTokens.FALSE_KEYWORD ;}
"super" { return KtTokens.SUPER_KEYWORD ;}
"yield" { return KtTokens.YIELD_KEYWORD ;}
"typeof" { return KtTokens.TYPEOF_KEYWORD ;}
"when" { return KtTokens.WHEN_KEYWORD ;}
"true" { return KtTokens.TRUE_KEYWORD ;}
@@ -78,7 +78,6 @@ public interface KtTokens {
KtKeywordToken INTERFACE_KEYWORD = KtKeywordToken.keyword("interface");
// Reserved for future use:
KtKeywordToken YIELD_KEYWORD = KtKeywordToken.keyword("yield");
KtKeywordToken TYPEOF_KEYWORD = KtKeywordToken.keyword("typeof");
KtToken AS_SAFE = KtKeywordToken.keyword("AS_SAFE");//new KtToken("as?");
@@ -197,7 +196,6 @@ public interface KtTokens {
IN_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD, CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD,
ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD, TRY_KEYWORD, WHEN_KEYWORD,
NOT_IN, NOT_IS, AS_SAFE,
YIELD_KEYWORD,
TYPEOF_KEYWORD
);
File diff suppressed because it is too large Load Diff
+4 -5
View File
@@ -6,8 +6,7 @@ JetFile: Reserved.kt
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting function name or receiver type
PsiElement(yield)('yield')
PsiElement(IDENTIFIER)('yield')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
@@ -40,10 +39,10 @@ JetFile: Reserved.kt
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting an element
PsiElement(yield)('yield')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('yield')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting an element
PsiElement(typeof)('typeof')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
@@ -52,7 +52,6 @@ public class KeywordStringsGenerated {
"do",
"when",
"interface",
"yield",
"typeof"
));
}
+1 -1
View File
@@ -1,2 +1,2 @@
//statement
int as, type, val, var, fun, is, in, object, when, yield, typeof;
int as, type, val, var, fun, is, in, object, when, typeof;
+1 -2
View File
@@ -7,5 +7,4 @@ val `is`: Int
val `in`: Int
val `object`: Int
val `when`: Int
val `yield`: Int
val `typeof`: Int
val `typeof`: Int
@@ -1,6 +1,6 @@
//file
package test;
import as.type.val.var.fun.is.in.object.when.yield.typeof;
import as.type.val.var.fun.is.in.object.when.typeof;
class Test {}
class Test {}
@@ -1,6 +1,6 @@
// ERROR: Unresolved reference: `as`
package test
import `as`.type.`val`.`var`.`fun`.`is`.`in`.`object`.`when`.`yield`.`typeof`
import `as`.type.`val`.`var`.`fun`.`is`.`in`.`object`.`when`.`typeof`
internal class Test
internal class Test
File diff suppressed because it is too large Load Diff
@@ -19,5 +19,4 @@ true
try
typeof
var
while
yield
while
@@ -28,4 +28,5 @@ static
switch
undefined
void
with
with
yield
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var `typeof`: String) {
data class DataClass(val `typeof`: String) {
init {
testNotRenamed("typeof", { `typeof` })
}
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var `var`: String) {
data class DataClass(val `var`: String) {
init {
testNotRenamed("var", { `var` })
}
@@ -2,9 +2,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var NaN: String) {
data class DataClass(val with: String) {
init {
testNotRenamed("NaN", { NaN })
testNotRenamed("with", { with })
}
}
@@ -2,9 +2,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val `try`: String) {
data class DataClass(val yield: String) {
init {
testNotRenamed("try", { `try` })
testNotRenamed("yield", { yield })
}
}
@@ -1,15 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var arguments: String) {
init {
testNotRenamed("arguments", { arguments })
}
}
fun box(): String {
DataClass("123")
return "OK"
}
@@ -2,9 +2,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val `true`: String) {
data class DataClass(var `break`: String) {
init {
testNotRenamed("true", { `true` })
testNotRenamed("break", { `break` })
}
}
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val Infinity: String) {
data class DataClass(var Infinity: String) {
init {
testNotRenamed("Infinity", { Infinity })
}
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val Kotlin: String) {
data class DataClass(var Kotlin: String) {
init {
testNotRenamed("Kotlin", { Kotlin })
}
@@ -0,0 +1,15 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var `while`: String) {
init {
testNotRenamed("while", { `while` })
}
}
fun box(): String {
DataClass("123")
return "OK"
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun `else`()
fun debugger()
}
class TraitImpl : Trait {
override fun `else`() { `else`() }
override fun debugger() { debugger() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("else", { `else`() })
testNotRenamed("debugger", { debugger() })
}
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun delete()
fun default()
}
class TraitImpl : Trait {
override fun delete() { delete() }
override fun default() { default() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("delete", { delete() })
testNotRenamed("default", { default() })
}
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun `false`()
}
class TraitImpl : Trait {
override fun `false`() { `false`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("false", { `false`() })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun enum()
fun `if`()
}
class TraitImpl : Trait {
override fun enum() { enum() }
override fun `if`() { `if`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("enum", { enum() })
testNotRenamed("if", { `if`() })
}
}
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun `in`()
}
class TraitImpl : Trait {
override fun `in`() { `in`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("in", { `in`() })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,13 +3,13 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun foo(export: String)
fun foo(delete: String)
}
class TraitImpl : Trait {
override fun foo(export: String) {
assertEquals("123", export)
testRenamed("export", { export })
override fun foo(delete: String) {
assertEquals("123", delete)
testRenamed("delete", { delete })
}
}
@@ -3,13 +3,13 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun foo(eval: String)
fun foo(enum: String)
}
class TraitImpl : Trait {
override fun foo(eval: String) {
assertEquals("123", eval)
testRenamed("eval", { eval })
override fun foo(enum: String) {
assertEquals("123", enum)
testRenamed("enum", { enum })
}
}
@@ -3,13 +3,13 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun foo(`if`: String)
fun foo(`interface`: String)
}
class TraitImpl : Trait {
override fun foo(`if`: String) {
assertEquals("123", `if`)
testRenamed("if", { `if` })
override fun foo(`interface`: String) {
assertEquals("123", `interface`)
testRenamed("interface", { `interface` })
}
}
@@ -3,13 +3,13 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun foo(`for`: String)
fun foo(`null`: String)
}
class TraitImpl : Trait {
override fun foo(`for`: String) {
assertEquals("123", `for`)
testRenamed("for", { `for` })
override fun foo(`null`: String) {
assertEquals("123", `null`)
testRenamed("null", { `null` })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("in", { `in`@ while (false) {} })
testRenamed("eval", { eval@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("finally", { finally@ while (false) {} })
testRenamed("export", { export@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("interface", { `interface`@ while (false) {} })
testRenamed("package", { `package`@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("extends", { extends@ while (false) {} })
testRenamed("return", { `return`@ while (false) {} })
}
}
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val await: Int
}
class TraitImpl : Trait {
override val await: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("await", { await })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val case: Int
}
class TraitImpl : Trait {
override val case: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("case", { case })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val `class`: Int
}
class TraitImpl : Trait {
override val `class`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("class", { `class` })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var `do`: Int
val `do`: Int
}
class TraitImpl : Trait {
override var `do`: Int = 0
override val `do`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val `else`: Int
}
class TraitImpl : Trait {
override val `else`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("else", { `else` })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val catch: Int
var catch: Int
}
class TraitImpl : Trait {
override val catch: Int = 0
override var catch: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val const: Int
var const: Int
}
class TraitImpl : Trait {
override val const: Int = 0
override var const: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var `continue`: Int
}
class TraitImpl : Trait {
override var `continue`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("continue", { `continue` })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var debugger: Int
}
class TraitImpl : Trait {
override var debugger: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("debugger", { debugger })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var default: Int
}
class TraitImpl : Trait {
override var default: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("default", { default })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val `break`: Int
var `false`: Int
}
class TraitImpl : Trait {
override val `break`: Int = 0
override var `false`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("break", { `break` })
testNotRenamed("false", { `false` })
}
}
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var `for`: Int
}
class TraitImpl : Trait {
override var `for`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("for", { `for` })
}
}
fun box(): String {
TestDelegate().test()
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
undefined
`continue`
}
fun box(): String {
testNotRenamed("undefined", { Foo.undefined })
testNotRenamed("continue", { Foo.`continue` })
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
switch
`do`
}
fun box(): String {
testNotRenamed("switch", { Foo.switch })
testNotRenamed("do", { Foo.`do` })
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
`while`
`public`
}
fun box(): String {
testNotRenamed("while", { Foo.`while` })
testNotRenamed("public", { Foo.`public` })
return "OK"
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
`yield`
static
}
fun box(): String {
testNotRenamed("yield", { Foo.`yield` })
testNotRenamed("static", { Foo.static })
return "OK"
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun import() { import() }
fun test() {
testNotRenamed("import", { import() })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun instanceof() { instanceof() }
fun test() {
testNotRenamed("instanceof", { instanceof() })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(`try`: String) {
assertEquals("123", `try`)
testRenamed("try", { `try` })
fun foo(let: String) {
assertEquals("123", let)
testRenamed("let", { let })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(private: String) {
assertEquals("123", private)
testRenamed("private", { private })
fun foo(new: String) {
assertEquals("123", new)
testRenamed("new", { new })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(protected: String) {
assertEquals("123", protected)
testRenamed("protected", { protected })
fun foo(`var`: String) {
assertEquals("123", `var`)
testRenamed("var", { `var` })
}
fun test() {
@@ -0,0 +1,21 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun foo(`while`: String) {
assertEquals("123", `while`)
testRenamed("while", { `while` })
}
fun test() {
foo("123")
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
var import: Int = 0
fun `try`() { `try`() }
fun test() {
testNotRenamed("import", { import })
testNotRenamed("try", { `try`() })
}
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun `throw`() { `throw`() }
fun `typeof`() { `typeof`() }
fun test() {
testNotRenamed("throw", { `throw`() })
testNotRenamed("typeof", { `typeof`() })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("public", { public@ while (false) {} })
testRenamed("break", { `break`@ while (false) {} })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("static", { static@ while (false) {} })
testRenamed("class", { `class`@ while (false) {} })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("var", { `var`@ while (false) {} })
testRenamed("private", { private@ while (false) {} })
}
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
val t: Int = 0
fun test() {
testRenamed("protected", { protected@ while (false) {} })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
val extends: Int = 0
fun test() {
testNotRenamed("extends", { extends })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
val finally: Int = 0
fun test() {
testNotRenamed("finally", { finally })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
var `super`: Int = 0
val `super`: Int = 0
fun test() {
testNotRenamed("super", { `super` })
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun let() { let() }
val `this`: Int = 0
fun test() {
testNotRenamed("let", { let() })
testNotRenamed("this", { `this` })
}
}
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
val function: Int = 0
var function: Int = 0
fun test() {
testNotRenamed("function", { function })
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
val implements: Int = 0
var implements: Int = 0
fun test() {
testNotRenamed("implements", { implements })
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
val `null`: Int = 0
var `throw`: Int = 0
fun test() {
testNotRenamed("null", { `null` })
testNotRenamed("throw", { `throw` })
}
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun new() { new() }
var `true`: Int = 0
fun test() {
testNotRenamed("new", { new() })
testNotRenamed("true", { `true` })
}
}
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun case() { case() }
fun arguments() { arguments() }
fun test() {
testNotRenamed("case", { case() })
testNotRenamed("arguments", { arguments() })
}
}
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun foo(const: String) {
assertEquals("123", const)
testRenamed("const", { const })
fun foo(case: String) {
assertEquals("123", case)
testRenamed("case", { case })
}
fun test() {
@@ -2,8 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
class TestClass {
fun foo(`true`: String) {
assertEquals("123", `true`)
testRenamed("true", { `true` })
@@ -15,7 +14,7 @@ enum class Foo {
}
fun box(): String {
Foo.BAR.test()
TestClass().test()
return "OK"
}
@@ -2,8 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
class TestClass {
fun `this`() { `this`() }
fun test() {
@@ -12,7 +11,7 @@ enum class Foo {
}
fun box(): String {
Foo.BAR.test()
TestClass().test()
return "OK"
}
@@ -6,7 +6,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("default", { default@ while (false) {} })
testRenamed("const", { const@ while (false) {} })
}
}
@@ -2,8 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
class TestClass {
val t: Int = 0
fun test() {
@@ -12,7 +11,7 @@ enum class Foo {
}
fun box(): String {
Foo.BAR.test()
TestClass().test()
return "OK"
}
@@ -1,19 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
fun `class`() { `class`() }
fun test() {
testNotRenamed("class", { `class`() })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun `break`() { `break`() }
fun `continue`() { `continue`() }
fun test() {
testNotRenamed("break", { `break`() })
testNotRenamed("continue", { `continue`() })
}
}
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
var export: Int = 0
fun `do`() { `do`() }
fun test() {
testNotRenamed("export", { export })
testNotRenamed("do", { `do`() })
}
}
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
val `typeof`: Int = 0
fun export() { export() }
fun test() {
testNotRenamed("typeof", { `typeof` })
testNotRenamed("export", { export() })
}
}
}
@@ -1,19 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
fun finally() { finally() }
fun test() {
testNotRenamed("finally", { finally() })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(`do`: String) {
assertEquals("123", `do`)
testRenamed("do", { `do` })
fun foo(`else`: String) {
assertEquals("123", `else`)
testRenamed("else", { `else` })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(`continue`: String) {
assertEquals("123", `continue`)
testRenamed("continue", { `continue` })
fun foo(`false`: String) {
assertEquals("123", `false`)
testRenamed("false", { `false` })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(implements: String) {
assertEquals("123", implements)
testRenamed("implements", { implements })
fun foo(finally: String) {
assertEquals("123", finally)
testRenamed("finally", { finally })
}
fun test() {
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("else", { `else`@ while (false) {} })
testRenamed("for", { `for`@ while (false) {} })
}
}
}
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("false", { `false`@ while (false) {} })
testRenamed("if", { `if`@ while (false) {} })
}
}
}
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("instanceof", { instanceof@ while (false) {} })
testRenamed("implements", { implements@ while (false) {} })
}
}
}
@@ -0,0 +1,19 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
val default: Int = 0
fun test() {
testNotRenamed("default", { default })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
var `while`: Int = 0
val `while`: Int = 0
fun test() {
testNotRenamed("while", { `while` })
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
var `yield`: Int = 0
var `break`: Int = 0
fun test() {
testNotRenamed("yield", { `yield` })
testNotRenamed("break", { `break` })
}
}
}
@@ -0,0 +1,19 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
var `class`: Int = 0
fun test() {
testNotRenamed("class", { `class` })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
val enum: Int = 0
var enum: Int = 0
fun test() {
testNotRenamed("enum", { enum })
@@ -3,7 +3,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
var `null`: Int = 0
val `null`: Int = 0
fun test() {
testNotRenamed("null", { `null` })
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
val `in`: Int = 0
val yield: Int = 0
fun test() {
testNotRenamed("in", { `in` })
testNotRenamed("yield", { yield })
}
}
@@ -1,17 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
var arguments: Int = 0
fun test() {
testNotRenamed("arguments", { arguments })
}
}
fun box(): String {
TestClass().test()
return "OK"
}
@@ -3,7 +3,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
val Kotlin: Int = 0
var Kotlin: Int = 0
fun test() {
testNotRenamed("Kotlin", { Kotlin })
@@ -2,8 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
class TestClass {
var `return`: Int = 0
fun test() {
@@ -12,7 +11,7 @@ enum class Foo {
}
fun box(): String {
Foo.BAR.test()
TestClass().test()
return "OK"
}
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun foo(`super`: String) {
assertEquals("123", `super`)
testRenamed("super", { `super` })
fun foo(static: String) {
assertEquals("123", static)
testRenamed("static", { static })
}
fun test() {
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
object TestObject {
fun foo(`this`: String) {
assertEquals("123", `this`)
testRenamed("this", { `this` })
@@ -14,7 +14,7 @@ class TestClass {
}
fun box(): String {
TestClass().test()
TestObject.test()
return "OK"
}

Some files were not shown because too many files have changed in this diff Show More