FIR: Fix type resolution for anonymous objects
^KT-39050 Fixed
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
abstract class Outer {
|
||||
interface Nested {
|
||||
fun bar()
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
object : Outer() {
|
||||
fun foo(n: Nested) {
|
||||
n.bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Impl : Outer() {
|
||||
fun foo(n: Nested) {
|
||||
n.bar()
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
FILE: typesFromSuperClasses.kt
|
||||
public abstract class Outer : R|kotlin/Any| {
|
||||
public constructor(): R|Outer| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public abstract interface Nested : R|kotlin/Any| {
|
||||
public abstract fun bar(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
object : R|Outer| {
|
||||
private constructor(): R|anonymous| {
|
||||
super<R|Outer|>()
|
||||
}
|
||||
|
||||
public[local] final fun foo(n: R|Outer.Nested|): R|kotlin/Unit| {
|
||||
R|<local>/n|.R|/Outer.Nested.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final class Impl : R|Outer| {
|
||||
public constructor(): R|Impl| {
|
||||
super<R|Outer|>()
|
||||
}
|
||||
|
||||
public final fun foo(n: R|Outer.Nested|): R|kotlin/Unit| {
|
||||
R|<local>/n|.R|/Outer.Nested.bar|()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user