'yield' reserved as a keyword

This commit is contained in:
Andrey Breslav
2015-12-08 18:31:20 +03:00
parent e6bba01798
commit 434082cadb
123 changed files with 1138 additions and 1073 deletions
@@ -18,4 +18,5 @@ throw
true
try
var
while
while
yield
@@ -29,5 +29,4 @@ switch
typeof
undefined
void
with
yield
with
@@ -1,15 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val undefined: String) {
init {
testNotRenamed("undefined", { undefined })
}
}
fun box(): String {
DataClass("123")
return "OK"
}
@@ -2,17 +2,14 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
var `var`: Int = 0
fun test() {
data class DataClass(val `var`: String) {
init {
testNotRenamed("var", { `var` })
}
}
fun box(): String {
Foo.BAR.test()
DataClass("123")
return "OK"
}
@@ -2,17 +2,14 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
var `while`: Int = 0
fun test() {
data class DataClass(val `while`: String) {
init {
testNotRenamed("while", { `while` })
}
}
fun box(): String {
Foo.BAR.test()
DataClass("123")
return "OK"
}
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var with: String) {
data class DataClass(val with: String) {
init {
testNotRenamed("with", { with })
}
@@ -2,7 +2,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(val `break`: String) {
data class DataClass(var `break`: String) {
init {
testNotRenamed("break", { `break` })
}
@@ -1,15 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var `continue`: String) {
init {
testNotRenamed("continue", { `continue` })
}
}
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 `class`: String) {
data class DataClass(var Infinity: String) {
init {
testNotRenamed("class", { `class` })
testNotRenamed("Infinity", { Infinity })
}
}
@@ -2,9 +2,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var `do`: String) {
data class DataClass(var Kotlin: String) {
init {
testNotRenamed("do", { `do` })
testNotRenamed("Kotlin", { Kotlin })
}
}
@@ -2,9 +2,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
data class DataClass(var yield: String) {
data class DataClass(var `yield`: String) {
init {
testNotRenamed("yield", { yield })
testNotRenamed("yield", { `yield` })
}
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun `null`()
fun debugger()
}
class TraitImpl : Trait {
override fun `null`() { `null`() }
override fun debugger() { debugger() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("null", { `null`() })
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 const()
fun default()
}
class TraitImpl : Trait {
override fun const() { const() }
override fun default() { default() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("const", { const() })
testNotRenamed("default", { default() })
}
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val NaN: Int
fun `if`()
}
class TraitImpl : Trait {
override val NaN: Int = 0
override fun `if`() { `if`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("NaN", { NaN })
testNotRenamed("if", { `if`() })
}
}
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var `in`: Int
fun `in`()
}
class TraitImpl : Trait {
override var `in`: Int = 0
override fun `in`() { `in`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("in", { `in` })
testNotRenamed("in", { `in`() })
}
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
fun `package`()
}
class TraitImpl : Trait {
override fun `package`() { `package`() }
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("package", { `package`() })
}
}
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(`super`: String)
fun foo(delete: String)
}
class TraitImpl : Trait {
override fun foo(`super`: String) {
assertEquals("123", `super`)
testRenamed("super", { `super` })
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(default: String)
fun foo(enum: String)
}
class TraitImpl : Trait {
override fun foo(default: String) {
assertEquals("123", default)
testRenamed("default", { default })
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(debugger: String)
fun foo(`interface`: String)
}
class TraitImpl : Trait {
override fun foo(debugger: String) {
assertEquals("123", debugger)
testRenamed("debugger", { debugger })
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(`return`: String)
fun foo(`null`: String)
}
class TraitImpl : Trait {
override fun foo(`return`: String) {
assertEquals("123", `return`)
testRenamed("return", { `return` })
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("enum", { enum@ while (false) {} })
testRenamed("eval", { eval@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("this", { `this`@ while (false) {} })
testRenamed("export", { export@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("delete", { delete@ while (false) {} })
testRenamed("package", { `package`@ while (false) {} })
}
}
@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("throw", { `throw`@ while (false) {} })
testRenamed("return", { `return`@ while (false) {} })
}
}
@@ -1,23 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val arguments: Int
}
class TraitImpl : Trait {
override val arguments: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("arguments", { arguments })
}
}
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 await: Int
val await: Int
}
class TraitImpl : Trait {
override var await: Int = 0
override val await: 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 {
var case: Int
val case: Int
}
class TraitImpl : Trait {
override var case: Int = 0
override val case: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
@@ -3,16 +3,16 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val `if`: Int
val `do`: Int
}
class TraitImpl : Trait {
override val `if`: Int = 0
override val `do`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("if", { `if` })
testNotRenamed("do", { `do` })
}
}
@@ -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"
}
@@ -0,0 +1,23 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
var catch: Int
}
class TraitImpl : Trait {
override var catch: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("catch", { catch })
}
}
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 {
var const: Int
}
class TraitImpl : Trait {
override var const: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("const", { const })
}
}
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 catch()
var `false`: Int
}
class TraitImpl : Trait {
override fun catch() { catch() }
override var `false`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("catch", { catch() })
testNotRenamed("false", { `false` })
}
}
@@ -3,11 +3,11 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
interface Trait {
val `for`: Int
var `for`: Int
}
class TraitImpl : Trait {
override val `for`: Int = 0
override var `for`: 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 `interface`: Int
}
class TraitImpl : Trait {
override var `interface`: Int = 0
}
class TestDelegate : Trait by TraitImpl() {
fun test() {
testNotRenamed("interface", { `interface` })
}
}
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 {
`protected`
`continue`
}
fun box(): String {
testNotRenamed("protected", { Foo.`protected` })
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 {
`if`
`do`
}
fun box(): String {
testNotRenamed("if", { Foo.`if` })
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 {
`private`
`public`
}
fun box(): String {
testNotRenamed("private", { Foo.`private` })
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 {
`for`
static
}
fun box(): String {
testNotRenamed("for", { Foo.`for` })
testNotRenamed("static", { Foo.static })
return "OK"
}
@@ -1,18 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun function() { function() }
fun test() {
testNotRenamed("function", { function() })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -1,18 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun implements() { implements() }
fun test() {
testNotRenamed("implements", { implements() })
}
}
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 import() { import() }
fun test() {
testNotRenamed("import", { import() })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun `class`() { `class`() }
fun instanceof() { instanceof() }
fun test() {
testNotRenamed("class", { `class`() })
testNotRenamed("instanceof", { instanceof() })
}
}
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(`do`: String) {
assertEquals("123", `do`)
testRenamed("do", { `do` })
fun foo(let: String) {
assertEquals("123", let)
testRenamed("let", { let })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(import: String) {
assertEquals("123", import)
testRenamed("import", { import })
fun foo(new: String) {
assertEquals("123", new)
testRenamed("new", { new })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(`continue`: String) {
assertEquals("123", `continue`)
testRenamed("continue", { `continue` })
fun foo(`while`: String) {
assertEquals("123", `while`)
testRenamed("while", { `while` })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
enum class Foo {
BAR;
fun foo(instanceof: String) {
assertEquals("123", instanceof)
testRenamed("instanceof", { instanceof })
fun foo(`yield`: String) {
assertEquals("123", `yield`)
testRenamed("yield", { `yield` })
}
fun test() {
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
fun `try`() { `try`() }
fun test() {
testNotRenamed("try", { `try`() })
}
}
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 `var`() { `var`() }
fun test() {
testNotRenamed("var", { `var`() })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("let", { let@ while (false) {} })
testRenamed("break", { `break`@ while (false) {} })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("new", { new@ while (false) {} })
testRenamed("class", { `class`@ while (false) {} })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("false", { `false`@ while (false) {} })
testRenamed("private", { private@ while (false) {} })
}
}
@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("else", { `else`@ while (false) {} })
testRenamed("protected", { protected@ while (false) {} })
}
}
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
var extends: Int = 0
val extends: Int = 0
fun test() {
testNotRenamed("extends", { extends })
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
var finally: Int = 0
val finally: Int = 0
fun test() {
testNotRenamed("finally", { finally })
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
val eval: Int = 0
val `super`: Int = 0
fun test() {
testNotRenamed("eval", { eval })
testNotRenamed("super", { `super` })
}
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
val `try`: Int = 0
val `this`: Int = 0
fun test() {
testNotRenamed("try", { `try` })
testNotRenamed("this", { `this` })
}
}
@@ -0,0 +1,18 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
enum class Foo {
BAR;
var function: Int = 0
fun test() {
testNotRenamed("function", { function })
}
}
fun box(): String {
Foo.BAR.test()
return "OK"
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun `break`() { `break`() }
var implements: Int = 0
fun test() {
testNotRenamed("break", { `break`() })
testNotRenamed("implements", { implements })
}
}
@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
val export: Int = 0
var `throw`: Int = 0
fun test() {
testNotRenamed("export", { export })
testNotRenamed("throw", { `throw` })
}
}
@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
val `true`: Int = 0
var `true`: Int = 0
fun test() {
testNotRenamed("true", { `true` })
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
var `super`: Int = 0
fun await() { await() }
fun test() {
testNotRenamed("super", { `super` })
testNotRenamed("await", { await() })
}
}
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun foo(await: String) {
assertEquals("123", await)
testRenamed("await", { await })
fun foo(catch: String) {
assertEquals("123", catch)
testRenamed("catch", { catch })
}
fun test() {
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun foo(`try`: String) {
assertEquals("123", `try`)
testRenamed("try", { `try` })
fun foo(`throw`: String) {
assertEquals("123", `throw`)
testRenamed("throw", { `throw` })
}
fun test() {
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun `throw`() { `throw`() }
fun `super`() { `super`() }
fun test() {
testNotRenamed("throw", { `throw`() })
testNotRenamed("super", { `super`() })
}
}
@@ -6,7 +6,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("while", { `while`@ while (false) {} })
testRenamed("debugger", { debugger@ while (false) {} })
}
}
@@ -6,7 +6,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("catch", { catch@ while (false) {} })
testRenamed("try", { `try`@ while (false) {} })
}
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun `false`() { `false`() }
fun `continue`() { `continue`() }
fun test() {
testNotRenamed("false", { `false`() })
testNotRenamed("continue", { `continue`() })
}
}
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun eval() { eval() }
fun `do`() { `do`() }
fun test() {
testNotRenamed("eval", { eval() })
testNotRenamed("do", { `do`() })
}
}
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun `else`() { `else`() }
fun extends() { extends() }
fun test() {
testNotRenamed("else", { `else`() })
testNotRenamed("extends", { extends() })
}
}
}
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(`for`: String) {
assertEquals("123", `for`)
testRenamed("for", { `for` })
fun foo(`else`: String) {
assertEquals("123", `else`)
testRenamed("else", { `else` })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(`if`: String) {
assertEquals("123", `if`)
testRenamed("if", { `if` })
fun foo(`false`: String) {
assertEquals("123", `false`)
testRenamed("false", { `false` })
}
fun test() {
@@ -4,9 +4,9 @@ package foo
class TestClass {
companion object {
fun foo(extends: String) {
assertEquals("123", extends)
testRenamed("extends", { extends })
fun foo(function: String) {
assertEquals("123", function)
testRenamed("function", { function })
}
fun test() {
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("function", { function@ while (false) {} })
testRenamed("for", { `for`@ while (false) {} })
}
}
}
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("in", { `in`@ while (false) {} })
testRenamed("if", { `if`@ while (false) {} })
}
}
}
@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("interface", { `interface`@ while (false) {} })
testRenamed("import", { import@ while (false) {} })
}
}
}
@@ -1,19 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
val debugger: Int = 0
fun test() {
testNotRenamed("debugger", { debugger })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
var delete: Int = 0
val delete: Int = 0
fun test() {
testNotRenamed("delete", { delete })
@@ -0,0 +1,19 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
val `while`: Int = 0
fun test() {
testNotRenamed("while", { `while` })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -0,0 +1,19 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
val `yield`: Int = 0
fun test() {
testNotRenamed("yield", { `yield` })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
val `break`: Int = 0
var `break`: Int = 0
fun test() {
testNotRenamed("break", { `break` })
@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
val `class`: Int = 0
var `class`: Int = 0
fun test() {
testNotRenamed("class", { `class` })
@@ -1,19 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
companion object {
var `continue`: Int = 0
fun test() {
testNotRenamed("continue", { `continue` })
}
}
}
fun box(): String {
TestClass.test()
return "OK"
}
@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
var `do`: Int = 0
var eval: Int = 0
fun test() {
testNotRenamed("do", { `do` })
testNotRenamed("eval", { eval })
}
}
}
@@ -3,7 +3,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
var Infinity: Int = 0
val Infinity: Int = 0
fun test() {
testNotRenamed("Infinity", { Infinity })
@@ -0,0 +1,17 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
val `interface`: Int = 0
fun test() {
testNotRenamed("interface", { `interface` })
}
}
fun box(): String {
TestClass().test()
return "OK"
}
@@ -1,17 +0,0 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
val yield: Int = 0
fun test() {
testNotRenamed("yield", { yield })
}
}
fun box(): String {
TestClass().test()
return "OK"
}
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
fun NaN() { NaN() }
var NaN: Int = 0
fun test() {
testNotRenamed("NaN", { NaN() })
testNotRenamed("NaN", { NaN })
}
}
@@ -3,7 +3,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
class TestClass {
val `package`: Int = 0
var `package`: Int = 0
fun test() {
testNotRenamed("package", { `package` })
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun foo(`try`: String) {
assertEquals("123", `try`)
testRenamed("try", { `try` })
fun foo(switch: String) {
assertEquals("123", switch)
testRenamed("switch", { switch })
}
fun test() {
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun foo(`true`: String) {
assertEquals("123", `true`)
testRenamed("true", { `true` })
fun foo(`this`: String) {
assertEquals("123", `this`)
testRenamed("this", { `this` })
}
fun test() {
@@ -3,9 +3,9 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun foo(public: String) {
assertEquals("123", public)
testRenamed("public", { public })
fun foo(`throw`: String) {
assertEquals("123", `throw`)
testRenamed("throw", { `throw` })
}
fun test() {
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun `this`() { `this`() }
fun public() { public() }
fun test() {
testNotRenamed("this", { `this`() })
testNotRenamed("public", { public() })
}
}
@@ -0,0 +1,17 @@
package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun `return`() { `return`() }
fun test() {
testNotRenamed("return", { `return`() })
}
}
fun box(): String {
TestObject.test()
return "OK"
}
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun `throw`() { `throw`() }
fun `super`() { `super`() }
fun test() {
testNotRenamed("throw", { `throw`() })
testNotRenamed("super", { `super`() })
}
}
@@ -6,7 +6,7 @@ object TestObject {
val t: Int = 0
fun test() {
testRenamed("while", { `while`@ while (false) {} })
testRenamed("true", { `true`@ while (false) {} })
}
}
@@ -6,7 +6,7 @@ object TestObject {
val t: Int = 0
fun test() {
testRenamed("var", { `var`@ while (false) {} })
testRenamed("try", { `try`@ while (false) {} })
}
}
@@ -6,7 +6,7 @@ object TestObject {
val t: Int = 0
fun test() {
testRenamed("switch", { switch@ while (false) {} })
testRenamed("undefined", { undefined@ while (false) {} })
}
}
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
val import: Int = 0
val `in`: Int = 0
fun test() {
testNotRenamed("import", { import })
testNotRenamed("in", { `in` })
}
}
@@ -3,10 +3,10 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
fun private() { private() }
val `interface`: Int = 0
fun test() {
testNotRenamed("private", { private() })
testNotRenamed("interface", { `interface` })
}
}
@@ -3,7 +3,7 @@ package foo
// NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT!
object TestObject {
var let: Int = 0
val let: Int = 0
fun test() {
testNotRenamed("let", { let })

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