Fix InnerClassesScopeWrapper - remove properties and functions from this scope.
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ class Test2<A, B, C>(foo: Any?, bar: Any?) {
|
||||
class Test3<in A, B, C>(foo: Any?, bar: Any?) {
|
||||
val foo = foo ?: this
|
||||
private val bar = bar ?: this
|
||||
private val bas = <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!><!DEBUG_INFO_MISSING_UNRESOLVED!>bas<!>()<!>
|
||||
private val bas = bas()
|
||||
val bas2 = bas2()
|
||||
|
||||
private fun bas(): Int = null!!
|
||||
@@ -47,7 +47,7 @@ class Test3<in A, B, C>(foo: Any?, bar: Any?) {
|
||||
class Test4<A, out B, C>(foo: Any?, bar: Any?) {
|
||||
val foo = foo ?: this
|
||||
private val bar = bar ?: this
|
||||
private val bas = <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!><!DEBUG_INFO_MISSING_UNRESOLVED!>bas<!>()<!>
|
||||
private val bas = bas()
|
||||
val bas2 = bas2()
|
||||
|
||||
private fun bas(): Int = null!!
|
||||
|
||||
@@ -37,7 +37,7 @@ internal final class Test2</*0*/ A, /*1*/ B, /*2*/ C> {
|
||||
internal final class Test3</*0*/ in A, /*1*/ B, /*2*/ C> {
|
||||
public constructor Test3</*0*/ in A, /*1*/ B, /*2*/ C>(/*0*/ foo: kotlin.Any?, /*1*/ bar: kotlin.Any?)
|
||||
private final val bar: kotlin.Any
|
||||
private final val bas: [ERROR : Type for bas()]
|
||||
private final val bas: kotlin.Int
|
||||
internal final val bas2: kotlin.Int
|
||||
internal final val foo: kotlin.Any
|
||||
internal final fun bar(): kotlin.Int
|
||||
@@ -54,7 +54,7 @@ internal final class Test3</*0*/ in A, /*1*/ B, /*2*/ C> {
|
||||
internal final class Test4</*0*/ A, /*1*/ out B, /*2*/ C> {
|
||||
public constructor Test4</*0*/ A, /*1*/ out B, /*2*/ C>(/*0*/ foo: kotlin.Any?, /*1*/ bar: kotlin.Any?)
|
||||
private final val bar: kotlin.Any
|
||||
private final val bas: [ERROR : Type for bas()]
|
||||
private final val bas: kotlin.Int
|
||||
internal final val bas2: kotlin.Int
|
||||
internal final val foo: kotlin.Any
|
||||
internal final fun bar(): kotlin.Int
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
interface A {
|
||||
val foo: Int
|
||||
val bar: String
|
||||
get() = ""
|
||||
}
|
||||
|
||||
fun test(foo: Int, bar: Int) {
|
||||
object : A {
|
||||
override val foo: Int = foo + bar
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
internal fun test(/*0*/ foo: kotlin.Int, /*1*/ bar: kotlin.Int): kotlin.Unit
|
||||
|
||||
internal interface A {
|
||||
internal open val bar: kotlin.String
|
||||
internal abstract val foo: 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
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
interface A {
|
||||
~from-interface~val foo: Int
|
||||
}
|
||||
|
||||
fun test(~param~foo: Int) {
|
||||
object : A {
|
||||
~property~override val foo: Int = `param`foo
|
||||
}
|
||||
}
|
||||
@@ -9465,6 +9465,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectInsideFun.kt")
|
||||
public void testObjectInsideFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectInsideFun.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectLiteralExpressionTypeMismatch.kt")
|
||||
public void testObjectLiteralExpressionTypeMismatch() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt");
|
||||
|
||||
@@ -480,6 +480,12 @@ public class ResolveTestGenerated extends AbstractResolveTest {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/regressions/kt300.resolve");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectInsideFun.resolve")
|
||||
public void testObjectInsideFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/regressions/objectInsideFun.resolve");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/resolve/varargs")
|
||||
|
||||
Reference in New Issue
Block a user