KT-2752: declare properties as a pair of functions when accessors are marked with @JsName
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package foo
|
||||
|
||||
class A {
|
||||
var x: Int
|
||||
<!JS_NAME_CLASH!>@JsName("xx") get() = 0<!>
|
||||
<!JS_NAME_CLASH!>@JsName("xx") set(value) {}<!>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
package foo {
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public final var x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -331,6 +331,12 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsNameOnAccessors.kt")
|
||||
public void testJsNameOnAccessors() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsNameOnPropertyAndAccessor.kt")
|
||||
public void testJsNameOnPropertyAndAccessor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnPropertyAndAccessor.kt");
|
||||
|
||||
Reference in New Issue
Block a user