Compare commits

...

5 Commits

Author SHA1 Message Date
Andrey Breslav
18ead3784e Minor. Drop deprecated unary operator names from JS back-end 2015-12-09 14:05:42 +03:00
Andrey Breslav
26b3cb4b89 Minor. Clean up the code in OperatorChecker.kt 2015-12-09 13:57:24 +03:00
Andrey Breslav
70088201cd Signature checks fixed for plus() and minus() 2015-12-09 13:56:34 +03:00
Andrey Breslav
58f0670f9b Error messages fixed for deprecations that have been made errors 2015-12-08 18:39:44 +03:00
Andrey Breslav
5db5aed6e2 'yield' reserved as a keyword 2015-12-08 18:31:21 +03:00
132 changed files with 1179 additions and 1109 deletions

View File

@@ -296,7 +296,7 @@ public class DefaultErrorMessages {
MAP.put(NO_GET_METHOD, "No get method providing array access");
MAP.put(NO_SET_METHOD, "No set method providing array access");
MAP.put(DEPRECATED_UNARY_PLUS_MINUS, "Deprecated convention for ''{0}''. Rename to ''{1}''", NAME, STRING);
MAP.put(DEPRECATED_UNARY_PLUS_MINUS, "Unary operation must be named ''{1}'', not ''{0}''", NAME, STRING);
MAP.put(INC_DEC_SHOULD_NOT_RETURN_UNIT, "Functions inc(), dec() shouldn't return Unit to be used by operators ++, --");
MAP.put(ASSIGNMENT_OPERATOR_SHOULD_RETURN_UNIT, "Function ''{0}'' should return Unit to be used by corresponding operator ''{1}''",
@@ -349,7 +349,7 @@ public class DefaultErrorMessages {
MAP.put(ITERATOR_AMBIGUITY, "Method ''iterator()'' is ambiguous for this expression: {0}", AMBIGUOUS_CALLS);
MAP.put(DELEGATE_SPECIAL_FUNCTION_MISSING, "Missing ''{0}'' method on delegate of type ''{1}''", STRING, RENDER_TYPE);
MAP.put(DELEGATE_RESOLVED_TO_DEPRECATED_CONVENTION, "''{0}'' method convention on type ''{1}'' is deprecated. Rename to ''{2}''", NAME, RENDER_TYPE, STRING);
MAP.put(DELEGATE_RESOLVED_TO_DEPRECATED_CONVENTION, "''{0}'' method convention on type ''{1}'' is no longer supported. Rename to ''{2}''", NAME, RENDER_TYPE, STRING);
MAP.put(DELEGATE_SPECIAL_FUNCTION_AMBIGUITY, "Overload resolution ambiguity on method ''{0}'': {1}", STRING, AMBIGUOUS_CALLS);
MAP.put(DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, "Property delegate must have a ''{0}'' method. None of the following functions is suitable: {1}",
STRING, AMBIGUOUS_CALLS);
@@ -492,7 +492,7 @@ public class DefaultErrorMessages {
MAP.put(VARIANCE_ON_TYPE_PARAMETER_OF_FUNCTION_OR_PROPERTY, "Variance annotations are only allowed for type parameters of classes and interfaces");
MAP.put(DEPRECATED_TYPE_PARAMETER_SYNTAX, "Placing function type parameters after the function name is deprecated");
MAP.put(DEPRECATED_TYPE_PARAMETER_SYNTAX, "Type parameters must be placed before the name of the function");
MAP.put(MISPLACED_TYPE_PARAMETER_CONSTRAINTS, "If a type parameter has multiple constraints, they all need to be placed in the 'where' clause");

View File

@@ -1,4 +1,4 @@
/* The following code was generated by JFlex 1.4.3 on 11/27/15 4:27 PM */
/* The following code was generated by JFlex 1.4.3 on 11/30/15 6:43 PM */
package org.jetbrains.kotlin.kdoc.lexer;
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.kdoc.parser.KDocKnownTag;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.3
* on 11/27/15 4:27 PM from the specification file
* on 11/30/15 6:43 PM from the specification file
* <tt>/Users/abreslav/work/kotlin/compiler/frontend/src/org/jetbrains/kotlin/kdoc/lexer/KDoc.flex</tt>
*/
class _KDocLexer implements FlexLexer {

View File

@@ -246,6 +246,7 @@ LONG_TEMPLATE_ENTRY_START=\$\{
"throw" { return KtTokens.THROW_KEYWORD ;}
"false" { return KtTokens.FALSE_KEYWORD ;}
"super" { return KtTokens.SUPER_KEYWORD ;}
"yield" { return KtTokens.YIELD_KEYWORD ;}
"when" { return KtTokens.WHEN_KEYWORD ;}
"true" { return KtTokens.TRUE_KEYWORD ;}
"this" { return KtTokens.THIS_KEYWORD ;}

View File

@@ -77,6 +77,9 @@ public interface KtTokens {
KtKeywordToken WHEN_KEYWORD = KtKeywordToken.keyword("when");
KtKeywordToken INTERFACE_KEYWORD = KtKeywordToken.keyword("interface");
// Reserved for future use:
KtKeywordToken YIELD_KEYWORD = KtKeywordToken.keyword("yield");
KtToken AS_SAFE = KtKeywordToken.keyword("AS_SAFE");//new KtToken("as?");
KtToken IDENTIFIER = new KtToken("IDENTIFIER");
@@ -188,7 +191,8 @@ public interface KtTokens {
TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD,
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
NOT_IN, NOT_IS, AS_SAFE,
YIELD_KEYWORD
);
TokenSet SOFT_KEYWORDS = TokenSet.create(FILE_KEYWORD, IMPORT_KEYWORD, WHERE_KEYWORD, BY_KEYWORD, GET_KEYWORD,

View File

@@ -1,15 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Example {
operator fun plus(): String = ""
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(): String = ""
operator fun unaryPlus(): Int = 0
}
class ExampleDeprecated {
operator fun plus(): String = ""
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(): String = ""
}
operator fun String.plus(): String = this
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun String.plus(): String = this
operator fun String.unaryPlus(): Int = 0
fun test() {
@@ -22,8 +22,8 @@ fun requireInt(n: Int) {}
fun requireString(s: String) {}
class Example2 {
operator fun plus() = this
operator fun minus() = this
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus() = this
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus() = this
fun test() {
<!DEPRECATED_UNARY_PLUS_MINUS!>+this<!>

View File

@@ -5,6 +5,8 @@ interface Example {
operator fun div(o: Example): Example
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(o: Example, s: String = ""): Example
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(vararg o: Example): Example
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(): Example
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(): Example
operator fun unaryPlus(): Example
operator fun unaryMinus(): Example
@@ -94,10 +96,12 @@ interface Example3 {
operator fun Example.plus(<!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
operator fun Example.plus(<!UNUSED_PARAMETER!>o<!>: Any): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
operator fun Example.div(<!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.plus(<!UNUSED_PARAMETER!>o<!>: Example, <!UNUSED_PARAMETER!>s<!>: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.minus(vararg <!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.plus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun Example.minus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
operator fun Example.unaryPlus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
operator fun Example.unaryMinus(): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
@@ -155,7 +159,7 @@ infix fun Example.i1(<!UNUSED_PARAMETER!>n<!>: Int) {}
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(<!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(<!UNUSED_PARAMETER!>o<!>: String): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun div(<!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun plus(<!UNUSED_PARAMETER!>o<!>: Example, <!UNUSED_PARAMETER!>s<!>: String = ""): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus(vararg <!UNUSED_PARAMETER!>o<!>: Example): Example {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>

View File

@@ -27,8 +27,8 @@ public operator fun minusAssign(/*0*/ n: kotlin.Int): kotlin.String
public operator fun modAssign(/*0*/ vararg n: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
public operator fun next(): kotlin.String
public operator fun next(/*0*/ n: kotlin.Int): kotlin.String
public operator fun plus(/*0*/ o: Example): Example
public operator fun plus(/*0*/ o: Example, /*1*/ s: kotlin.String = ...): Example
public operator fun plus(/*0*/ o: kotlin.String): Example
public operator fun plusAssign(/*0*/ n: kotlin.Int): kotlin.Unit
public operator fun rangeTo(/*0*/ vararg o: kotlin.String /*kotlin.Array<out kotlin.String>*/): kotlin.Unit
public operator fun rangeTo(/*0*/ o: kotlin.Int): kotlin.Unit
@@ -62,13 +62,15 @@ public operator fun Example.inc(): Example
public operator fun Example.invoke(): kotlin.Unit
public operator fun Example.iterator(): kotlin.String
public operator fun Example.iterator(/*0*/ n: kotlin.Int): kotlin.String
public operator fun Example.minus(): Example
public operator fun Example.minus(/*0*/ vararg o: Example /*kotlin.Array<out Example>*/): Example
public operator fun Example.minusAssign(/*0*/ n: kotlin.Int): kotlin.String
public operator fun Example.modAssign(/*0*/ vararg n: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
public operator fun Example.next(): kotlin.String
public operator fun Example.next(/*0*/ n: kotlin.Int): kotlin.String
public operator fun Example.plus(/*0*/ o: Example): Example
public operator fun Example.plus(): Example
public operator fun Example.plus(/*0*/ o: Example, /*1*/ s: kotlin.String = ...): Example
public operator fun Example.plus(/*0*/ o: kotlin.Any): Example
public operator fun Example.plusAssign(/*0*/ n: kotlin.Int): kotlin.Unit
public operator fun Example.rangeTo(/*0*/ vararg o: kotlin.String /*kotlin.Array<out kotlin.String>*/): kotlin.Unit
public operator fun Example.rangeTo(/*0*/ o: kotlin.Int): kotlin.Unit
@@ -119,11 +121,13 @@ public interface Example {
public abstract operator fun invoke(): kotlin.Unit
public abstract operator fun iterator(): kotlin.String
public abstract operator fun iterator(/*0*/ n: kotlin.Int): kotlin.String
public abstract operator fun minus(): Example
public abstract operator fun minus(/*0*/ vararg o: Example /*kotlin.Array<out Example>*/): Example
public abstract operator fun minusAssign(/*0*/ n: kotlin.Int): kotlin.String
public abstract operator fun modAssign(/*0*/ vararg n: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
public abstract operator fun next(): kotlin.String
public abstract operator fun next(/*0*/ n: kotlin.Int): kotlin.String
public abstract operator fun plus(): Example
public abstract operator fun plus(/*0*/ o: Example): Example
public abstract operator fun plus(/*0*/ o: Example, /*1*/ s: kotlin.String = ...): Example
public abstract operator fun plusAssign(/*0*/ n: kotlin.Int): kotlin.Unit

5
compiler/testData/psi/Reserved.kt vendored Normal file
View File

@@ -0,0 +1,5 @@
fun yield() {}
fun test() {
yield
}

33
compiler/testData/psi/Reserved.txt vendored Normal file
View File

@@ -0,0 +1,33 @@
JetFile: Reserved.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting function name or receiver type
PsiElement(yield)('yield')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('test')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting an element
PsiElement(yield)('yield')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')

View File

@@ -637,6 +637,12 @@ public class ParsingTestGenerated extends AbstractParsingTest {
doParsingTest(fileName);
}
@TestMetadata("Reserved.kt")
public void testReserved() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Reserved.kt");
doParsingTest(fileName);
}
@TestMetadata("RootPackage.kt")
public void testRootPackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/RootPackage.kt");

View File

@@ -51,6 +51,7 @@ public class KeywordStringsGenerated {
"while",
"do",
"when",
"interface"
"interface",
"yield"
));
}

View File

@@ -41,15 +41,11 @@ import org.jetbrains.kotlin.util.OperatorNameConventions.HAS_NEXT
import org.jetbrains.kotlin.util.OperatorNameConventions.INC
import org.jetbrains.kotlin.util.OperatorNameConventions.INVOKE
import org.jetbrains.kotlin.util.OperatorNameConventions.ITERATOR
import org.jetbrains.kotlin.util.OperatorNameConventions.MINUS
import org.jetbrains.kotlin.util.OperatorNameConventions.NEXT
import org.jetbrains.kotlin.util.OperatorNameConventions.NOT
import org.jetbrains.kotlin.util.OperatorNameConventions.PLUS
import org.jetbrains.kotlin.util.OperatorNameConventions.RANGE_TO
import org.jetbrains.kotlin.util.OperatorNameConventions.SET
import org.jetbrains.kotlin.util.OperatorNameConventions.SET_VALUE
import org.jetbrains.kotlin.util.OperatorNameConventions.UNARY_MINUS
import org.jetbrains.kotlin.util.OperatorNameConventions.UNARY_PLUS
import org.jetbrains.kotlin.util.OperatorNameConventions.SIMPLE_UNARY_OPERATION_NAMES
object OperatorChecks {
fun canBeOperator(functionDescriptor: FunctionDescriptor): Boolean {
@@ -64,38 +60,39 @@ object OperatorChecks {
val lastIsOk = valueParameters.lastOrNull()?.let { !it.hasDefaultValue() && it.varargElementType == null } ?: false
valueParameters.size >= 2 && lastIsOk
}
GET_VALUE == name -> noDefaultsAndVarargs && valueParameters.size >= 2 && valueParameters[1].isKProperty
SET_VALUE == name -> noDefaultsAndVarargs && valueParameters.size >= 3 && valueParameters[1].isKProperty
INVOKE == name -> isMemberOrExtension
CONTAINS == name -> singleValueParameter && noDefaultsAndVarargs && returnsBoolean
ITERATOR == name -> noValueParameters
NEXT == name -> noValueParameters
HAS_NEXT == name -> noValueParameters && returnsBoolean
RANGE_TO == name -> singleValueParameter && noDefaultsAndVarargs
EQUALS == name -> {
fun DeclarationDescriptor.isAny() = (this as? ClassDescriptor)?.let { KotlinBuiltIns.isAny(it) } ?: false
isMember && overriddenDescriptors.any { it.containingDeclaration.isAny() }
}
COMPARE_TO == name -> returnsInt && singleValueParameter && noDefaultsAndVarargs
BINARY_OPERATION_NAMES.any { it == name } && functionDescriptor.valueParameters.size == 1 ->
singleValueParameter && noDefaultsAndVarargs
(PLUS == name) || (MINUS == name) || (UNARY_PLUS == name) || (UNARY_MINUS == name) || (NOT == name) ->
noValueParameters
(INC == name) || (DEC == name) -> {
name in BINARY_OPERATION_NAMES -> singleValueParameter && noDefaultsAndVarargs
name in SIMPLE_UNARY_OPERATION_NAMES -> noValueParameters
INC == name || DEC == name -> {
val receiver = dispatchReceiverParameter ?: extensionReceiverParameter
isMemberOrExtension && (receiver != null) && (returnType?.let { it.isSubtypeOf(receiver.type) } ?: false)
}
ASSIGNMENT_OPERATIONS.any { it == name } ->
name in ASSIGNMENT_OPERATIONS ->
returnsUnit && singleValueParameter && noDefaultsAndVarargs
name.asString().matches(COMPONENT_REGEX) -> noValueParameters
else -> false
}
}

View File

@@ -17,7 +17,6 @@
package org.jetbrains.kotlin.util
import org.jetbrains.kotlin.name.Name
import java.util.*
import kotlin.text.Regex
object OperatorNameConventions {
@@ -63,8 +62,9 @@ object OperatorNameConventions {
// If you add new unary, binary or assignment operators, add it to OperatorConventions as well
val UNARY_OPERATION_NAMES_WITH_DEPRECATED = Collections.unmodifiableSet(setOf(INC, DEC, UNARY_PLUS, PLUS, UNARY_MINUS, MINUS, NOT))
@JvmField
internal val UNARY_OPERATION_NAMES = setOf(INC, DEC, UNARY_PLUS, UNARY_MINUS, NOT)
internal val SIMPLE_UNARY_OPERATION_NAMES = setOf(UNARY_PLUS, UNARY_MINUS, NOT)
internal val BINARY_OPERATION_NAMES = setOf(TIMES, PLUS, MINUS, DIV, MOD, RANGE_TO)
internal val ASSIGNMENT_OPERATIONS = setOf(TIMES_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN)

View File

@@ -320,7 +320,8 @@ class TestDataBuilder() {
error("The file '$fileName' unexpectedly exists when create test data from scratch.")
}
} else if (!isCreatingFromScratch) {
error("Unexpected new testdata file: '$fileName'. It may cause for example because of bug in stdlib.")
error("Unexpected new testdata file: '$fileName'. It may cause for example because of bug in stdlib.\n" +
"If a new keyword has been added, delete SHOULD_BE_ESCAPED.txt and SHOULD_NOT_BE_ESCAPED.txt")
}
GeneratorsFileUtil.writeFileIfContentChanged(testDataFile, out, false)

View File

@@ -1,5 +1,5 @@
// "Rename to 'setValue'" "true"
// ERROR: 'get' method convention on type 'CustomDelegate' is deprecated. Rename to 'getValue'
// ERROR: 'get' method convention on type 'CustomDelegate' is no longer supported. Rename to 'getValue'
import kotlin.reflect.KProperty

View File

@@ -1,5 +1,5 @@
// "Rename to 'setValue'" "true"
// ERROR: 'get' method convention on type 'CustomDelegate' is deprecated. Rename to 'getValue'
// ERROR: 'get' method convention on type 'CustomDelegate' is no longer supported. Rename to 'getValue'
import kotlin.reflect.KProperty

View File

@@ -1,2 +1,2 @@
//statement
int as, type, val, var, fun, is, in, object, when;
int as, type, val, var, fun, is, in, object, when, yield;

View File

@@ -6,4 +6,5 @@ val `fun`: Int
val `is`: Int
val `in`: Int
val `object`: Int
val `when`: Int
val `when`: Int
val `yield`: Int

View File

@@ -1,6 +1,6 @@
//file
package test;
import as.type.val.var.fun.is.in.object.when;
import as.type.val.var.fun.is.in.object.when.yield;
class Test {}

View File

@@ -1,6 +1,6 @@
// ERROR: Unresolved reference: `as`
package test
import `as`.type.`val`.`var`.`fun`.`is`.`in`.`object`.`when`
import `as`.type.`val`.`var`.`fun`.`is`.`in`.`object`.`when`.`yield`
internal class Test

View File

@@ -43,7 +43,7 @@ public enum PrimitiveUnaryOperationFIF implements FunctionIntrinsicFactory {
INSTANCE;
private static final NamePredicate UNARY_OPERATIONS = new NamePredicate(OperatorNameConventions.UNARY_OPERATION_NAMES_WITH_DEPRECATED);
private static final NamePredicate UNARY_OPERATIONS = new NamePredicate(OperatorNameConventions.UNARY_OPERATION_NAMES);
@NotNull
private static final DescriptorPredicate UNARY_OPERATION_FOR_PRIMITIVE_NUMBER =
pattern(NamePredicate.PRIMITIVE_NUMBERS_MAPPED_TO_PRIMITIVE_JS, UNARY_OPERATIONS);

View File

@@ -18,4 +18,5 @@ throw
true
try
var
while
while
yield

View File

@@ -29,5 +29,4 @@ switch
typeof
undefined
void
with
yield
with

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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 })
}

View File

@@ -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` })
}

View File

@@ -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"
}

View File

@@ -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 })
}
}

View File

@@ -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 })
}
}

View File

@@ -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` })
}
}

View File

@@ -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() })
}
}

View File

@@ -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() })
}
}

View File

@@ -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`() })
}
}

View File

@@ -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`() })
}
}

View File

@@ -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"
}

View File

@@ -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 })
}
}

View File

@@ -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 })
}
}

View File

@@ -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` })
}
}

View File

@@ -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` })
}
}

View File

@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("enum", { enum@ while (false) {} })
testRenamed("eval", { eval@ while (false) {} })
}
}

View File

@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("this", { `this`@ while (false) {} })
testRenamed("export", { export@ while (false) {} })
}
}

View File

@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("delete", { delete@ while (false) {} })
testRenamed("package", { `package`@ while (false) {} })
}
}

View File

@@ -12,7 +12,7 @@ class TraitImpl : Trait {
class TestDelegate : Trait by TraitImpl() {
fun test() {
testRenamed("throw", { `throw`@ while (false) {} })
testRenamed("return", { `return`@ while (false) {} })
}
}

View File

@@ -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"
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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` })
}
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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` })
}
}

View File

@@ -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() {

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -4,10 +4,10 @@ package foo
enum class Foo {
BAR;
fun `class`() { `class`() }
fun instanceof() { instanceof() }
fun test() {
testNotRenamed("class", { `class`() })
testNotRenamed("instanceof", { instanceof() })
}
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("let", { let@ while (false) {} })
testRenamed("break", { `break`@ while (false) {} })
}
}

View File

@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("new", { new@ while (false) {} })
testRenamed("class", { `class`@ while (false) {} })
}
}

View File

@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("false", { `false`@ while (false) {} })
testRenamed("private", { private@ while (false) {} })
}
}

View File

@@ -7,7 +7,7 @@ enum class Foo {
val t: Int = 0
fun test() {
testRenamed("else", { `else`@ while (false) {} })
testRenamed("protected", { protected@ while (false) {} })
}
}

View File

@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
var extends: Int = 0
val extends: Int = 0
fun test() {
testNotRenamed("extends", { extends })

View File

@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
var finally: Int = 0
val finally: Int = 0
fun test() {
testNotRenamed("finally", { finally })

View File

@@ -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` })
}
}

View File

@@ -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` })
}
}

View File

@@ -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"
}

View File

@@ -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 })
}
}

View File

@@ -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` })
}
}

View File

@@ -4,7 +4,7 @@ package foo
enum class Foo {
BAR;
val `true`: Int = 0
var `true`: Int = 0
fun test() {
testNotRenamed("true", { `true` })

View File

@@ -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() })
}
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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`() })
}
}

View File

@@ -6,7 +6,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("while", { `while`@ while (false) {} })
testRenamed("debugger", { debugger@ while (false) {} })
}
}

View File

@@ -6,7 +6,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("catch", { catch@ while (false) {} })
testRenamed("try", { `try`@ while (false) {} })
}
}

View File

@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun `false`() { `false`() }
fun `continue`() { `continue`() }
fun test() {
testNotRenamed("false", { `false`() })
testNotRenamed("continue", { `continue`() })
}
}
}

View File

@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun eval() { eval() }
fun `do`() { `do`() }
fun test() {
testNotRenamed("eval", { eval() })
testNotRenamed("do", { `do`() })
}
}
}

View File

@@ -4,10 +4,10 @@ package foo
class TestClass {
companion object {
fun `else`() { `else`() }
fun extends() { extends() }
fun test() {
testNotRenamed("else", { `else`() })
testNotRenamed("extends", { extends() })
}
}
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("function", { function@ while (false) {} })
testRenamed("for", { `for`@ while (false) {} })
}
}
}

View File

@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("in", { `in`@ while (false) {} })
testRenamed("if", { `if`@ while (false) {} })
}
}
}

View File

@@ -7,7 +7,7 @@ class TestClass {
val t: Int = 0
fun test() {
testRenamed("interface", { `interface`@ while (false) {} })
testRenamed("import", { import@ while (false) {} })
}
}
}

View File

@@ -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"
}

View File

@@ -4,7 +4,7 @@ package foo
class TestClass {
companion object {
var delete: Int = 0
val delete: Int = 0
fun test() {
testNotRenamed("delete", { delete })

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