Fix return type of private members that return anonymous object
#KT-16813 Fixed Anonymous objects returned from private-in-file members should behave as for private class members
This commit is contained in:
@@ -907,8 +907,7 @@ public class DescriptorResolver {
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean definedInClass = DescriptorUtils.getParentOfType(descriptor, ClassDescriptor.class) != null;
|
if (!Visibilities.isPrivate(descriptor.getVisibility())) {
|
||||||
if (!definedInClass || !Visibilities.isPrivate(descriptor.getVisibility())) {
|
|
||||||
if (type.getConstructor().getSupertypes().size() == 1) {
|
if (type.getConstructor().getSupertypes().size() == 1) {
|
||||||
return type.getConstructor().getSupertypes().iterator().next();
|
return type.getConstructor().getSupertypes().iterator().next();
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
interface IFoo {
|
||||||
|
fun foo(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IBar
|
||||||
|
|
||||||
|
private fun createAnonObject() =
|
||||||
|
object : IFoo, IBar {
|
||||||
|
override fun foo() = "foo"
|
||||||
|
fun qux(): String = "qux"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun useAnonObject() {
|
||||||
|
createAnonObject().foo()
|
||||||
|
createAnonObject().qux()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
if (createAnonObject().foo() != "foo") return "fail 1"
|
||||||
|
if (createAnonObject().qux() != "qux") return "fail 2"
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+46
-46
@@ -1,9 +1,9 @@
|
|||||||
interface MyTrait {
|
interface MyTrait {
|
||||||
fun f1() {}
|
fun f1() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
open class MyClass {
|
open class MyClass {
|
||||||
fun f2() {}
|
fun f2() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@ class Foo {
|
|||||||
private val privateProperty = object : MyClass(), MyTrait {}
|
private val privateProperty = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
privateProperty.f1()
|
privateProperty.f1()
|
||||||
privateProperty.f2()
|
privateProperty.f2()
|
||||||
}
|
}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected val <!EXPOSED_PROPERTY_TYPE!>protectedProperty<!><!> = object : MyClass(), MyTrait {}
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected val <!EXPOSED_PROPERTY_TYPE!>protectedProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
@@ -25,14 +25,14 @@ class Foo {
|
|||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public val <!EXPOSED_PROPERTY_TYPE!>publicProperty<!><!> = object : MyClass(), MyTrait {}
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public val <!EXPOSED_PROPERTY_TYPE!>publicProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
val <!EXPOSED_PROPERTY_TYPE!>propertyWithGetter<!>
|
val <!EXPOSED_PROPERTY_TYPE!>propertyWithGetter<!>
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>get()<!> = object: MyClass(), MyTrait {}
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>get()<!> = object: MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
|
||||||
private fun privateFunction() = object : MyClass(), MyTrait {}
|
private fun privateFunction() = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
privateFunction().f1()
|
privateFunction().f1()
|
||||||
privateFunction().f2()
|
privateFunction().f2()
|
||||||
}
|
}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>protectedFunction<!>()<!> = object : MyClass(), MyTrait {}
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>protectedFunction<!>()<!> = object : MyClass(), MyTrait {}
|
||||||
@@ -45,53 +45,53 @@ class Foo {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class FooInner {
|
class FooInner {
|
||||||
private val privatePropertyInner = object : MyClass(), MyTrait {}
|
private val privatePropertyInner = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
init {
|
||||||
|
privatePropertyInner.f1()
|
||||||
|
privatePropertyInner.f2()
|
||||||
|
}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected val <!EXPOSED_PROPERTY_TYPE!>protectedProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>val <!EXPOSED_PROPERTY_TYPE!>internalProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>internal val <!EXPOSED_PROPERTY_TYPE!>internal2Property<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public val <!EXPOSED_PROPERTY_TYPE!>publicProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
|
||||||
|
private fun privateFunctionInner() = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
init {
|
||||||
|
privateFunctionInner().f1()
|
||||||
|
privateFunctionInner().f2()
|
||||||
|
}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>protectedFunction<!>()<!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>fun <!EXPOSED_FUNCTION_RETURN_TYPE!>internalFunction<!>()<!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>internal fun <!EXPOSED_FUNCTION_RETURN_TYPE!>internal2Function<!>()<!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public fun <!EXPOSED_FUNCTION_RETURN_TYPE!>publicFunction<!>()<!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
init {
|
|
||||||
privatePropertyInner.f1()
|
|
||||||
privatePropertyInner.f2()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected val <!EXPOSED_PROPERTY_TYPE!>protectedProperty<!><!> = object : MyClass(), MyTrait {}
|
fun foo() {
|
||||||
|
val localVar = object : MyClass(), MyTrait {}
|
||||||
|
localVar.f1()
|
||||||
|
localVar.f2()
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>val <!EXPOSED_PROPERTY_TYPE!>internalProperty<!><!> = object : MyClass(), MyTrait {}
|
fun foo2() = object : MyClass(), MyTrait {}
|
||||||
|
foo2().f1()
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>internal val <!EXPOSED_PROPERTY_TYPE!>internal2Property<!><!> = object : MyClass(), MyTrait {}
|
foo2().f2()
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public val <!EXPOSED_PROPERTY_TYPE!>publicProperty<!><!> = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
|
|
||||||
private fun privateFunctionInner() = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
init {
|
|
||||||
privateFunctionInner().f1()
|
|
||||||
privateFunctionInner().f2()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>protectedFunction<!>()<!> = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>fun <!EXPOSED_FUNCTION_RETURN_TYPE!>internalFunction<!>()<!> = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>internal fun <!EXPOSED_FUNCTION_RETURN_TYPE!>internal2Function<!>()<!> = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>public fun <!EXPOSED_FUNCTION_RETURN_TYPE!>publicFunction<!>()<!> = object : MyClass(), MyTrait {}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
fun foo() {
|
|
||||||
val localVar = object : MyClass(), MyTrait {}
|
|
||||||
localVar.f1()
|
|
||||||
localVar.f2()
|
|
||||||
|
|
||||||
fun foo2() = object : MyClass(), MyTrait {}
|
|
||||||
foo2().f1()
|
|
||||||
foo2().f2()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>private val packagePrivateProperty<!> = object : MyClass(), MyTrait {}
|
private val packagePrivateProperty = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!><!WRONG_MODIFIER_TARGET!>protected<!> val <!EXPOSED_PROPERTY_TYPE!>packageProtectedProperty<!><!> = object : MyClass(), MyTrait {}
|
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!><!WRONG_MODIFIER_TARGET!>protected<!> val <!EXPOSED_PROPERTY_TYPE!>packageProtectedProperty<!><!> = object : MyClass(), MyTrait {}
|
||||||
|
|
||||||
|
|||||||
+52
-52
@@ -1,5 +1,5 @@
|
|||||||
open class MyClass {
|
open class MyClass {
|
||||||
fun f1() {}
|
fun f1() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -19,15 +19,15 @@ class Foo {
|
|||||||
|
|
||||||
|
|
||||||
fun testProperties() {
|
fun testProperties() {
|
||||||
privateProperty.f1()
|
privateProperty.f1()
|
||||||
internalProperty.f1()
|
internalProperty.f1()
|
||||||
protected2Property.f1()
|
protected2Property.f1()
|
||||||
public2Property.f1()
|
public2Property.f1()
|
||||||
|
|
||||||
privateProperty.visible()
|
privateProperty.visible()
|
||||||
protected2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
protected2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
public2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
public2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
internalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
internalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -45,15 +45,15 @@ class Foo {
|
|||||||
|
|
||||||
|
|
||||||
fun testFunctions() {
|
fun testFunctions() {
|
||||||
privateFunction().f1()
|
privateFunction().f1()
|
||||||
internalFunction().f1()
|
internalFunction().f1()
|
||||||
public2Function().f1()
|
public2Function().f1()
|
||||||
protected2Function().f1()
|
protected2Function().f1()
|
||||||
|
|
||||||
privateFunction().visible()
|
privateFunction().visible()
|
||||||
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
protected2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
protected2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -73,49 +73,49 @@ class Foo {
|
|||||||
|
|
||||||
|
|
||||||
fun testProperties() {
|
fun testProperties() {
|
||||||
privateProperty.f1()
|
privateProperty.f1()
|
||||||
internalProperty.f1()
|
internalProperty.f1()
|
||||||
protected2Property.f1()
|
protected2Property.f1()
|
||||||
public2Property.f1()
|
public2Property.f1()
|
||||||
|
|
||||||
privateProperty.visible()
|
privateProperty.visible()
|
||||||
protected2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
protected2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
public2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
public2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
internalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
internalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected fun protectedFunction() = object : MyClass() {}
|
protected fun protectedFunction() = object : MyClass() {}
|
||||||
|
|
||||||
public fun publicFunction() = object : MyClass() {}
|
public fun publicFunction() = object : MyClass() {}
|
||||||
|
|
||||||
protected fun protected2Function(): MyClass = object : MyClass() {fun visible() {}}
|
protected fun protected2Function(): MyClass = object : MyClass() {fun visible() {}}
|
||||||
|
|
||||||
public fun public2Function(): MyClass = object : MyClass() {fun visible() {}}
|
public fun public2Function(): MyClass = object : MyClass() {fun visible() {}}
|
||||||
|
|
||||||
private fun privateFunction() = object : MyClass() {fun visible() {}}
|
private fun privateFunction() = object : MyClass() {fun visible() {}}
|
||||||
|
|
||||||
internal fun internalFunction() = object : MyClass() {fun invisible() {}}
|
internal fun internalFunction() = object : MyClass() {fun invisible() {}}
|
||||||
|
|
||||||
|
|
||||||
fun testFunctions() {
|
fun testFunctions() {
|
||||||
privateFunction().f1()
|
privateFunction().f1()
|
||||||
internalFunction().f1()
|
internalFunction().f1()
|
||||||
public2Function().f1()
|
public2Function().f1()
|
||||||
protected2Function().f1()
|
protected2Function().f1()
|
||||||
|
|
||||||
privateFunction().visible()
|
privateFunction().visible()
|
||||||
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
protected2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
protected2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
val localVar = object : MyClass() {}
|
val localVar = object : MyClass() {}
|
||||||
localVar.f1()
|
localVar.f1()
|
||||||
fun foo2() = object : MyClass() {}
|
fun foo2() = object : MyClass() {}
|
||||||
foo2().f1()
|
foo2().f1()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ fun testProperties() {
|
|||||||
packageInternalProperty.f1()
|
packageInternalProperty.f1()
|
||||||
packagePublic2Property.f1()
|
packagePublic2Property.f1()
|
||||||
|
|
||||||
packagePrivateProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
packagePrivateProperty.invisible()
|
||||||
packageInternalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
packageInternalProperty.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
packagePublic2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
packagePublic2Property.<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
@@ -155,13 +155,13 @@ internal fun internalFunction() = object : MyClass() {fun invisible() {}}
|
|||||||
|
|
||||||
|
|
||||||
fun testFunctions() {
|
fun testFunctions() {
|
||||||
privateFunction().f1()
|
privateFunction().f1()
|
||||||
internalFunction().f1()
|
internalFunction().f1()
|
||||||
public2Function().f1()
|
public2Function().f1()
|
||||||
|
|
||||||
privateFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
privateFunction().invisible()
|
||||||
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
internalFunction().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
public2Function().<!UNRESOLVED_REFERENCE!>invisible<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fooPackage() {
|
fun fooPackage() {
|
||||||
|
|||||||
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
internal val packageInternalProperty: MyClass
|
internal val packageInternalProperty: MyClass
|
||||||
private val packagePrivateProperty: MyClass
|
private val packagePrivateProperty: packagePrivateProperty.<no name provided>
|
||||||
protected val packageProtectedProperty: MyClass
|
protected val packageProtectedProperty: MyClass
|
||||||
public val packagePublic2Property: MyClass
|
public val packagePublic2Property: MyClass
|
||||||
public val packagePublicProperty: MyClass
|
public val packagePublicProperty: MyClass
|
||||||
public fun fooPackage(): kotlin.Unit
|
public fun fooPackage(): kotlin.Unit
|
||||||
internal fun internalFunction(): MyClass
|
internal fun internalFunction(): MyClass
|
||||||
private fun privateFunction(): MyClass
|
private fun privateFunction(): privateFunction.<no name provided>
|
||||||
protected fun protectedFunction(): MyClass
|
protected fun protectedFunction(): MyClass
|
||||||
public fun public2Function(): MyClass
|
public fun public2Function(): MyClass
|
||||||
public fun publicFunction(): MyClass
|
public fun publicFunction(): MyClass
|
||||||
|
|||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
interface IFoo {
|
||||||
|
fun foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IBar
|
||||||
|
|
||||||
|
private fun createAnonObject() =
|
||||||
|
object : IFoo, IBar {
|
||||||
|
override fun foo() {}
|
||||||
|
fun qux() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val propOfAnonObject = object : IFoo, IBar {
|
||||||
|
override fun foo() {}
|
||||||
|
fun qux() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun useAnonObject() {
|
||||||
|
createAnonObject().foo()
|
||||||
|
createAnonObject().qux()
|
||||||
|
|
||||||
|
propOfAnonObject.foo()
|
||||||
|
propOfAnonObject.qux()
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
private val propOfAnonObject: propOfAnonObject.<no name provided>
|
||||||
|
private fun createAnonObject(): createAnonObject.<no name provided>
|
||||||
|
public fun useAnonObject(): kotlin.Unit
|
||||||
|
|
||||||
|
public interface IBar {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IFoo {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public abstract fun foo(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
private var x = object {}
|
private var x = object {}
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
// No error, because the type of x is normalized to Any
|
x = <!TYPE_MISMATCH!>object<!> {}
|
||||||
x = object {}
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
private var x: kotlin.Any
|
private var x: x.<no name provided>
|
||||||
public fun test(): kotlin.Unit
|
public fun test(): kotlin.Unit
|
||||||
|
|||||||
+6
@@ -11198,6 +11198,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt")
|
||||||
|
public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
||||||
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
||||||
|
|||||||
@@ -17098,6 +17098,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectFromTopLevelMember.kt")
|
||||||
|
public void testAnonymousObjectFromTopLevelMember() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("capturedTypesInLambdaParameter.kt")
|
@TestMetadata("capturedTypesInLambdaParameter.kt")
|
||||||
public void testCapturedTypesInLambdaParameter() throws Exception {
|
public void testCapturedTypesInLambdaParameter() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt");
|
||||||
|
|||||||
@@ -11198,6 +11198,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt")
|
||||||
|
public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
||||||
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
||||||
|
|||||||
@@ -11198,6 +11198,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt")
|
||||||
|
public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
||||||
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ Run Java
|
|||||||
Connected to the target VM
|
Connected to the target VM
|
||||||
ceAnonymousObject.kt:18
|
ceAnonymousObject.kt:18
|
||||||
Compile bytecode for publicTopLevelObject
|
Compile bytecode for publicTopLevelObject
|
||||||
Compile bytecode for privateTopLevelObject
|
|
||||||
Compile bytecode for publicObject
|
Compile bytecode for publicObject
|
||||||
Compile bytecode for protectedObject
|
Compile bytecode for protectedObject
|
||||||
Compile bytecode for localObject
|
Compile bytecode for localObject
|
||||||
|
|||||||
idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObject.kt
Vendored
+5
-2
@@ -22,8 +22,11 @@ class MyClass {
|
|||||||
// EXPRESSION: publicTopLevelObject
|
// EXPRESSION: publicTopLevelObject
|
||||||
// RESULT: instance of ceAnonymousObject.CeAnonymousObjectKt$publicTopLevelObject$1(id=ID): LceAnonymousObject/CeAnonymousObjectKt$publicTopLevelObject$1;
|
// RESULT: instance of ceAnonymousObject.CeAnonymousObjectKt$publicTopLevelObject$1(id=ID): LceAnonymousObject/CeAnonymousObjectKt$publicTopLevelObject$1;
|
||||||
|
|
||||||
// EXPRESSION: privateTopLevelObject
|
// -EXPRESSION: privateTopLevelObject
|
||||||
// RESULT: instance of ceAnonymousObject.CeAnonymousObjectKt$privateTopLevelObject$1(id=ID): LceAnonymousObject/CeAnonymousObjectKt$privateTopLevelObject$1;
|
// -RESULT: 1
|
||||||
|
|
||||||
|
// -EXPRESSION: privateTopLevelObject.test()
|
||||||
|
// -RESULT: 1: I
|
||||||
|
|
||||||
// EXPRESSION: publicObject
|
// EXPRESSION: publicObject
|
||||||
// RESULT: instance of ceAnonymousObject.MyClass$publicObject$1(id=ID): LceAnonymousObject/MyClass$publicObject$1;
|
// RESULT: instance of ceAnonymousObject.MyClass$publicObject$1(id=ID): LceAnonymousObject/MyClass$publicObject$1;
|
||||||
|
|||||||
@@ -12616,6 +12616,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt")
|
||||||
|
public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
|
||||||
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user