diff --git a/compiler/fir/analysis-tests/testData/extendedCheckers/RedundantVisibilityModifierChecker.txt b/compiler/fir/analysis-tests/testData/extendedCheckers/RedundantVisibilityModifierChecker.txt new file mode 100644 index 00000000000..a256b84f68e --- /dev/null +++ b/compiler/fir/analysis-tests/testData/extendedCheckers/RedundantVisibilityModifierChecker.txt @@ -0,0 +1,116 @@ +FILE: RedundantVisibilityModifierChecker.kt + public final class C : R|kotlin/Any| { + public constructor(): R|C| { + super() + } + + public final val foo: R|kotlin/Int| = Int(0) + public get(): R|kotlin/Int| + + public final fun bar(): R|kotlin/Unit| { + } + + } + public open class D : R|kotlin/Any| { + public constructor(): R|D| { + super() + } + + protected open fun willRemainProtected(): R|kotlin/Unit| { + } + + protected open fun willBecomePublic(): R|kotlin/Unit| { + } + + } + public final class E : R|D| { + public constructor(): R|E| { + super() + } + + protected final override fun willRemainProtected(): R|kotlin/Unit| { + } + + public final override fun willBecomePublic(): R|kotlin/Unit| { + } + + } + public final enum class F : R|kotlin/Enum| { + private constructor(x: R|kotlin/Int|): R|F| { + super|>() + } + + public final val x: R|kotlin/Int| = R|/x| + public get(): R|kotlin/Int| + + public final static enum entry FIRST: R|F| = object : R|F| { + private[local] constructor(): R|| { + super(Int(42)) + } + + } + + public final static fun values(): R|kotlin/Array| { + } + + public final static fun valueOf(value: R|kotlin/String|): R|F| { + } + + } + public sealed class G : R|kotlin/Any| { + private constructor(y: R|kotlin/Int|): R|G| { + super() + } + + public final val y: R|kotlin/Int| = R|/y| + public get(): R|kotlin/Int| + + private constructor(): R|G| { + this(Int(42)) + } + + public final object H : R|G| { + private constructor(): R|G.H| { + super() + } + + } + + } + public abstract interface I : R|kotlin/Any| { + public abstract fun bar(): R|kotlin/Unit| + + } + public final fun f(): R|kotlin/Unit| { + lval i: R|| = object : R|I| { + private[local] constructor(): R|| { + super() + } + + internal[local] final var foo: R|kotlin/Int| = Int(0) + internal get(): R|kotlin/Int| + internal set(value: R|kotlin/Int|): R|kotlin/Unit| + + public[local] final override fun bar(): R|kotlin/Unit| { + } + + } + + R|/i|.R|/.foo| = Int(1) + local final class LocalClass : R|kotlin/Any| { + public[local] constructor(): R|LocalClass| { + super() + } + + internal[local] final var foo: R|kotlin/Int| = Int(0) + internal get(): R|kotlin/Int| + internal set(value: R|kotlin/Int|): R|kotlin/Unit| + + } + + R|/LocalClass.LocalClass|().R|/LocalClass.foo| = Int(1) + lvar baz: R|kotlin/Int| = Int(0) + } + public final var baz: R|kotlin/Int| = Int(0) + public get(): R|kotlin/Int| + public set(value: R|kotlin/Int|): R|kotlin/Unit|