FILE: returnTypeMismatchOnOverride.kt
    public open class A : R|kotlin/Any| {
        public constructor(): R|A| {
            super<R|kotlin/Any|>()
        }

        public open fun test(): R|kotlin/Number| {
            ^test Int(10)
        }

    }
    public open class B : R|A| {
        public constructor(): R|B| {
            super<R|A|>()
        }

        public open override fun test(): R|kotlin/Double| {
            ^test Double(20.0)
        }

        public final fun test(x: R|kotlin/Int|): R|kotlin/Int| {
            ^test R|<local>/x|
        }

    }
    public final class C : R|A| {
        public constructor(): R|C| {
            super<R|A|>()
        }

        public final override fun test(): R|kotlin/String| {
            ^test String(Test)
        }

    }
    public open class D : R|B| {
        public constructor(): R|D| {
            super<R|B|>()
        }

        public open override fun test(): R|kotlin/Char| {
            ^test Char(10)
        }

    }
    public final class E<T : R|kotlin/Double|> : R|B| {
        public constructor<T : R|kotlin/Double|>(value: R|T|): R|E<T>| {
            super<R|B|>()
        }

        public final val value: R|T| = R|<local>/value|
            public get(): R|T|

        public final override fun test(): R|T| {
            ^test this@R|/E|.R|/E.value|
        }

    }
    public open class F<T : R|kotlin/Number|> : R|kotlin/Any| {
        public constructor<T : R|kotlin/Number|>(value: R|T|): R|F<T>| {
            super<R|kotlin/Any|>()
        }

        public final val value: R|T| = R|<local>/value|
            public get(): R|T|

        public open fun rest(): R|T| {
            ^rest this@R|/F|.R|/F.value|
        }

    }
    public final class G<E : R|kotlin/Double|> : R|F<E>| {
        public constructor<E : R|kotlin/Double|>(balue: R|E|): R|G<E>| {
            super<R|F<E>|>(R|<local>/balue|)
        }

        public final val balue: R|E| = R|<local>/balue|
            public get(): R|E|

        public final override fun rest(): R|E| {
            ^rest this@R|/G|.R|/G.balue|
        }

    }
    public final class H<E : R|kotlin/String|> : R|F<E>| {
        public constructor<E : R|kotlin/String|>(balue: R|E|): R|H<E>| {
            super<R|F<E>|>(R|<local>/balue|)
        }

        public final val balue: R|E| = R|<local>/balue|
            public get(): R|E|

        public final override fun rest(): R|E| {
            ^rest this@R|/H|.R|/H.balue|
        }

    }
    public final class M<E : R|kotlin/String|> : R|F<kotlin/Double>| {
        public constructor<E : R|kotlin/String|>(balue: R|E|): R|M<E>| {
            super<R|F<kotlin/Double>|>(Double(3.14))
        }

        public final val balue: R|E| = R|<local>/balue|
            public get(): R|E|

        public final override fun rest(): R|E| {
            ^rest this@R|/M|.R|/M.balue|
        }

    }
    public open class X : R|kotlin/Any| {
        public constructor(): R|X| {
            super<R|kotlin/Any|>()
        }

    }
    public open class Y : R|X| {
        public constructor(): R|Y| {
            super<R|X|>()
        }

    }
    public open class Z : R|Y| {
        public constructor(): R|Z| {
            super<R|Y|>()
        }

    }
    public open class W : R|Z| {
        public constructor(): R|W| {
            super<R|Z|>()
        }

    }
    public open class V : R|kotlin/Any| {
        public constructor(): R|V| {
            super<R|kotlin/Any|>()
        }

        public open fun hello(): R|X| {
            ^hello R|/X.X|()
        }

    }
    public open class L : R|V| {
        public constructor(): R|L| {
            super<R|V|>()
        }

    }
    public open class Q : R|L| {
        public constructor(): R|Q| {
            super<R|L|>()
        }

    }
    public open class S : R|Q| {
        public constructor(): R|S| {
            super<R|Q|>()
        }

        public open override fun hello(): R|W| {
            ^hello R|/W.W|()
        }

    }
    public open class J : R|S| {
        public constructor(): R|J| {
            super<R|S|>()
        }

        public open override fun hello(): R|Z| {
            ^hello R|/Z.Z|()
        }

    }
    public open class Base<T : R|X|, Z : R|T|> : R|kotlin/Any| {
        public constructor<T : R|X|, Z : R|T|>(): R|Base<T, Z>| {
            super<R|kotlin/Any|>()
        }

        public open fun kek(): R|Z| {
            ^kek <CS errors: /Z.Z>#()
        }

    }
    public open class GoodDerrived : R|Base<Y, W>| {
        public constructor(): R|GoodDerrived| {
            super<R|Base<Y, W>|>()
        }

        public open override fun kek(): R|W| {
            ^kek R|/W.W|()
        }

    }
    public open class BadDerrived : R|Base<Y, W>| {
        public constructor(): R|BadDerrived| {
            super<R|Base<Y, W>|>()
        }

        public open override fun kek(): R|kotlin/String| {
            ^kek String(test)
        }

    }
