Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/objectInnerClass.txt
T
Dmitriy Novozhilov 419f54259c [TEST] Change semantics of CHECK_TYPE directive and update testdata
Previously helpers from checkType.kt was in special package, and
  if directive was enabled then test runner (`AbstractDiagnosticTest`)
  injected additional imports to test files and removed them after test
  was completed.
It's very hard to support such behavior in new test infrastructure so
  there was a decision about changing `CHECK_TYPE`:
1. All helpers from `checkType.kt` now stays in default package
2. `CHECK_TYPE` only adds `checkType.kt` to set of analyzed files
      and don't modify their content

For test which are written in default package (most of tests actually)
  there are no changes. On the other hand if there is a test where dev
  want to use checkType functions in testfile with some package then he
  should explicitly import functions which he needed (`checkSubtype`,
  `checkType`, `_`)
2020-11-13 10:36:12 +03:00

214 lines
8.2 KiB
Plaintext
Vendored

FILE: objectInnerClass.kt
public final val case1: R|A| = object : R|A| {
private constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
local final inner class Child : R|<anonymous>.Base| {
public constructor(property: R|B|): R|<anonymous>.Child| {
this@R|/<anonymous>|.super<R|<anonymous>.Base|>(R|<local>/property|)
}
public final fun R|<anonymous>.Base|.zoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.Child.zoo|.R|/<anonymous>.Base.property|
}
public final fun foo(): R|kotlin/Unit| {
this@R|/<anonymous>.Child|.R|/<anonymous>.Base.baseFun|()
lval x: R|B| = this@R|/<anonymous>.Child|.R|/<anonymous>.Base.property|
(this@R|/<anonymous>.Child|, this@R|/<anonymous>.Child|).R|/<anonymous>.Child.zoo|()
(this@R|/<anonymous>|, this@R|/<anonymous>.Child|).R|/<anonymous>.hoo|()
}
}
public final fun R|<anonymous>.Child|.voo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.voo|.R|/<anonymous>.Base.property|
}
public final fun R|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.hoo|.R|/<anonymous>.Base.property|
}
local open inner class Base : R|kotlin/Any| {
public constructor(property: R|B|): R|<anonymous>.Base| {
super<R|kotlin/Any|>()
}
public final val property: R|B| = R|<local>/property|
public get(): R|B|
public final fun baseFun(): R|kotlin/Unit| {
}
}
public final fun caseForBase(): R|kotlin/Unit| {
lval base: R|<anonymous>.Base| = this@R|/<anonymous>|.R|/<anonymous>.Base.Base|(R|/B.B|())
R|<local>/base|.R|/<anonymous>.Base.baseFun|()
R|<local>/base|.R|/<anonymous>.Base.property|
(this@R|/<anonymous>|, R|<local>/base|).R|/<anonymous>.hoo|()
}
public final fun caseForChild(): R|kotlin/Unit| {
lval child: R|<anonymous>.Child| = this@R|/<anonymous>|.R|/<anonymous>.Child.Child|(R|/B.B|())
R|<local>/child|.R|/<anonymous>.Base.baseFun|()
R|<local>/child|.R|/<anonymous>.Base.property|
R|<local>/child|.R|/<anonymous>.Child.foo|()
(this@R|/<anonymous>|, R|<local>/child|).R|/<anonymous>.hoo|()
(this@R|/<anonymous>|, R|<local>/child|).R|/<anonymous>.voo|()
}
}
public get(): R|A|
public final class Case2 : R|kotlin/Any| {
public constructor(): R|Case2| {
super<R|kotlin/Any|>()
}
public final val x: R|Case2.Base| = object : R|Case2.Base| {
private constructor(): R|<anonymous>| {
this@R|/Case2|.super<R|Case2.Base|>(R|/B.B|())
}
public final fun R|Case2.Base|.zoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.zoo|.R|/Case2.Base.property|
}
public final fun foo(): R|kotlin/Unit| {
this@R|/<anonymous>|.R|/Case2.Base.baseFun|()
lval x: R|B| = this@R|/<anonymous>|.R|/Case2.Base.property|
(this@R|/<anonymous>|, this@R|/<anonymous>|).R|/<anonymous>.zoo|()
(this@R|/Case2|, this@R|/<anonymous>|).R|/Case2.hoo|()
}
}
public get(): R|Case2.Base|
public final fun R|Case2.Base|.hoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/Case2.hoo|.R|/Case2.Base.property|
}
public open inner class Base : R|kotlin/Any| {
public constructor(property: R|B|): R|Case2.Base| {
super<R|kotlin/Any|>()
}
public final val property: R|B| = R|<local>/property|
public get(): R|B|
public final fun baseFun(): R|kotlin/Unit| {
}
}
public final fun caseForBase(): R|kotlin/Unit| {
lval base: R|Case2.Base| = this@R|/Case2|.R|/Case2.Base.Base|(R|/B.B|())
R|<local>/base|.R|/Case2.Base.baseFun|()
R|<local>/base|.R|/Case2.Base.property|
(this@R|/Case2|, R|<local>/base|).R|/Case2.hoo|()
}
public final fun caseForChild(): R|kotlin/Unit| {
lval child: R|Case2.Base| = this@R|/Case2|.R|/Case2.x|
R|<local>/child|.R|/Case2.Base.baseFun|()
R|<local>/child|.R|/Case2.Base.property|
(this@R|/Case2|, R|<local>/child|).R|/Case2.hoo|()
}
}
public final class Case3 : R|kotlin/Any| {
public constructor(): R|Case3| {
super<R|kotlin/Any|>()
}
public final val x: R|A| = object : R|A| {
private constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
local final inner class Child : R|Case3.<anonymous>.Base| {
public constructor(property: R|B|): R|Case3.<anonymous>.Child| {
this@R|/<anonymous>|.super<R|Case3.<anonymous>.Base|>(R|<local>/property|)
}
public final fun R|Case3.<anonymous>.Base|.zoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/Case3.<anonymous>.Child.zoo|.R|/Case3.<anonymous>.Base.property|
}
public final fun foo(): R|kotlin/Unit| {
this@R|/Case3.<anonymous>.Child|.R|/Case3.<anonymous>.Base.baseFun|()
lval x: R|B| = this@R|/Case3.<anonymous>.Child|.R|/Case3.<anonymous>.Base.property|
(this@R|/Case3.<anonymous>.Child|, this@R|/Case3.<anonymous>.Child|).R|/Case3.<anonymous>.Child.zoo|()
(this@R|/<anonymous>|, this@R|/Case3.<anonymous>.Child|).R|/<anonymous>.hoo|()
}
}
public final fun R|Case3.<anonymous>.Child|.voo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.voo|.R|/Case3.<anonymous>.Base.property|
}
public final fun R|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
lval x: R|B| = this@R|/<anonymous>.hoo|.R|/Case3.<anonymous>.Base.property|
}
local open inner class Base : R|kotlin/Any| {
public constructor(property: R|B|): R|Case3.<anonymous>.Base| {
super<R|kotlin/Any|>()
}
public final val property: R|B| = R|<local>/property|
public get(): R|B|
public final fun baseFun(): R|kotlin/Unit| {
}
}
public final fun caseForBase(): R|kotlin/Unit| {
lval base: R|Case3.<anonymous>.Base| = this@R|/<anonymous>|.R|/Case3.<anonymous>.Base.Base|(R|/B.B|())
R|<local>/base|.R|/Case3.<anonymous>.Base.baseFun|()
R|<local>/base|.R|/Case3.<anonymous>.Base.property|
(this@R|/<anonymous>|, R|<local>/base|).R|/<anonymous>.hoo|()
}
public final fun caseForChild(): R|kotlin/Unit| {
lval child: R|Case3.<anonymous>.Child| = this@R|/<anonymous>|.R|/Case3.<anonymous>.Child.Child|(R|/B.B|())
R|<local>/child|.R|/Case3.<anonymous>.Base.baseFun|()
R|<local>/child|.R|/Case3.<anonymous>.Base.property|
R|<local>/child|.R|/Case3.<anonymous>.Child.foo|()
(this@R|/<anonymous>|, R|<local>/child|).R|/<anonymous>.hoo|()
(this@R|/<anonymous>|, R|<local>/child|).R|/<anonymous>.voo|()
}
}
public get(): R|A|
}
public abstract interface A : R|kotlin/Any| {
}
public final class B : R|kotlin/Any| {
public constructor(): R|B| {
super<R|kotlin/Any|>()
}
}
FILE: CHECK_TYPE.kt
public final fun <T> checkSubtype(t: R|T|): R|T| {
^checkSubtype R|<local>/t|
}
public final class CheckTypeInv<T> : R|kotlin/Any| {
public constructor<T>(): R|CheckTypeInv<T>| {
super<R|kotlin/Any|>()
}
}
public final fun <E> R|CheckTypeInv<E>|._(): R|kotlin/Unit| {
}
public final infix fun <T> R|T|.checkType(f: R|CheckTypeInv<T>.() -> kotlin/Unit|): R|kotlin/Unit| {
}