[FIR] Fixes for RedundantReturnUnitType checker
This commit is contained in:
+8
@@ -1,4 +1,12 @@
|
||||
data class My(val x: Unit)
|
||||
|
||||
interface I {
|
||||
val x: Unit
|
||||
}
|
||||
|
||||
class A {
|
||||
fun too(): @Annotation Unit {}
|
||||
|
||||
fun foo(): <!REDUNDANT_RETURN_UNIT_TYPE!>Unit<!>
|
||||
{
|
||||
}
|
||||
|
||||
+21
@@ -1,9 +1,30 @@
|
||||
FILE: RedundantReturnUnitTypeChecker.kt
|
||||
public final data class My : R|kotlin/Any| {
|
||||
public constructor(x: R|kotlin/Unit|): R|My| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/Unit| = R|<local>/x|
|
||||
public get(): R|kotlin/Unit|
|
||||
|
||||
public final fun component1(): R|kotlin/Unit|
|
||||
|
||||
public final fun copy(x: R|kotlin/Unit| = this@R|/My|.R|/My.x|): R|My|
|
||||
|
||||
}
|
||||
public abstract interface I : R|kotlin/Any| {
|
||||
public abstract val x: R|kotlin/Unit|
|
||||
public get(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun too(): @R|kotlin/Annotation|() R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user