K2: reproduce KT-64982
This commit is contained in:
committed by
Space Team
parent
8f9bb75e60
commit
0a21669fb9
+32
@@ -0,0 +1,32 @@
|
||||
// ISSUE: KT-64982
|
||||
// FIR_DUMP
|
||||
|
||||
class Outer<T> {
|
||||
companion object
|
||||
|
||||
class Nested<S> {
|
||||
companion object
|
||||
}
|
||||
|
||||
inner class Inner<R> {
|
||||
companion <!NESTED_CLASS_NOT_ALLOWED!>object<!>
|
||||
}
|
||||
|
||||
object Obj
|
||||
}
|
||||
|
||||
val test = Outer<String>
|
||||
|
||||
val test2 = Outer.Nested<String>
|
||||
|
||||
val test3 = Outer<Int>.<!NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE!>Inner<!><Double>
|
||||
|
||||
val test4 = Outer<Int>.<!NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE!>Obj<!>
|
||||
|
||||
val test5 = Outer
|
||||
|
||||
val test6 = Outer.Nested
|
||||
|
||||
val test7 = Outer.Inner
|
||||
|
||||
val test8 = Outer.Obj
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
FILE: incompleteConstructorCall.fir.kt
|
||||
public final class Outer<T> : R|kotlin/Any| {
|
||||
public constructor<T>(): R|Outer<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|Outer.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final class Nested<S> : R|kotlin/Any| {
|
||||
public constructor<S>(): R|Outer.Nested<S>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|Outer.Nested.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final inner class Inner<R, Outer(T)> : R|kotlin/Any| {
|
||||
public Outer<T>.constructor<R>(): R|Outer.Inner<R, T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|Outer.Inner.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final object Obj : R|kotlin/Any| {
|
||||
private constructor(): R|Outer.Obj| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final val test: R|Outer.Companion| = Q|Outer|
|
||||
public get(): R|Outer.Companion|
|
||||
public final val test2: R|Outer.Nested.Companion| = Q|Outer.Nested|
|
||||
public get(): R|Outer.Nested.Companion|
|
||||
public final val test3: R|Outer.Inner.Companion| = R|kotlin/Double|
|
||||
public get(): R|Outer.Inner.Companion|
|
||||
public final val test4: R|Outer.Obj| =
|
||||
public get(): R|Outer.Obj|
|
||||
public final val test5: R|Outer.Companion| = Q|Outer|
|
||||
public get(): R|Outer.Companion|
|
||||
public final val test6: R|Outer.Nested.Companion| = Q|Outer.Nested|
|
||||
public get(): R|Outer.Nested.Companion|
|
||||
public final val test7: R|Outer.Inner.Companion| = Q|Outer.Inner|
|
||||
public get(): R|Outer.Inner.Companion|
|
||||
public final val test8: R|Outer.Obj| = Q|Outer.Obj|
|
||||
public get(): R|Outer.Obj|
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// ISSUE: KT-64982
|
||||
// FIR_DUMP
|
||||
|
||||
class Outer<T> {
|
||||
companion object
|
||||
|
||||
class Nested<S> {
|
||||
companion object
|
||||
}
|
||||
|
||||
inner class Inner<R> {
|
||||
companion <!NESTED_CLASS_NOT_ALLOWED!>object<!>
|
||||
}
|
||||
|
||||
object Obj
|
||||
}
|
||||
|
||||
val test = <!FUNCTION_CALL_EXPECTED!>Outer<String><!>
|
||||
|
||||
val test2 = Outer.<!FUNCTION_CALL_EXPECTED!>Nested<String><!>
|
||||
|
||||
val test3 = <!FUNCTION_CALL_EXPECTED!>Outer<Int><!>.<!FUNCTION_CALL_EXPECTED!>Inner<Double><!>
|
||||
|
||||
val test4 = <!FUNCTION_CALL_EXPECTED!>Outer<Int><!>.<!NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE!>Obj<!>
|
||||
|
||||
val test5 = Outer
|
||||
|
||||
val test6 = Outer.Nested
|
||||
|
||||
val test7 = Outer.<!NO_COMPANION_OBJECT!>Inner<!>
|
||||
|
||||
val test8 = Outer.Obj
|
||||
Reference in New Issue
Block a user