[FIR] Infer type arguments for captured parameters of inner classes
KT-38992
This commit is contained in:
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
interface AbstractFirTreeBuilder
|
||||
|
||||
class FirTreeBuilder : AbstractFirTreeBuilder
|
||||
|
||||
abstract class AbstractBuilderConfigurator<T : AbstractFirTreeBuilder> {
|
||||
abstract class BuilderConfigurationContext
|
||||
|
||||
inner class LeafBuilderConfigurationContext : BuilderConfigurationContext()
|
||||
}
|
||||
|
||||
class BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>() {
|
||||
fun test(func: (LeafBuilderConfigurationContext) -> Unit) {
|
||||
val context = LeafBuilderConfigurationContext()
|
||||
func(context)
|
||||
}
|
||||
}
|
||||
|
||||
class Outer<E> {
|
||||
inner class Inner
|
||||
|
||||
fun foo(x: (Inner) -> Unit, y: Inner.() -> Unit) {
|
||||
// each call reported as INAPPLICABLE because "Inner<E> is not a subtype of Inner"
|
||||
bar(Inner())
|
||||
x(Inner())
|
||||
Inner().y()
|
||||
}
|
||||
|
||||
fun bar(i: Inner) {}
|
||||
}
|
||||
Reference in New Issue
Block a user