missingSealedInheritor.fir.txt 1.9 KB
Newer Older
1 2
FILE: a.kt
    public sealed class Base : R|kotlin/Any| {
3
        protected constructor(): R|Base| {
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
            super<R|kotlin/Any|>()
        }

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

    }
FILE: b.kt
    public final object B : R|Base| {
        private constructor(): R|B| {
            super<R|Base|>()
        }

    }
FILE: c.kt
    public final fun test_1(base: R|Base|): R|kotlin/Unit| {
        lval x: R|kotlin/Unit| = when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
        }

        lval y: R|kotlin/Unit| = when (R|<local>/base|) {
            ==($subj$, Q|B|) ->  {
                Int(1)
            }
        }

        lval z: R|kotlin/Int| = when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
            ==($subj$, Q|B|) ->  {
                Int(2)
            }
        }

    }
    public final fun test_2(base: R|Base?|): R|kotlin/Unit| {
        lval x: R|kotlin/Unit| = when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
            ($subj$ is R|B|) ->  {
                Int(2)
            }
        }

        lval y: R|kotlin/Unit| = when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
            ==($subj$, Q|B|) ->  {
                Int(2)
            }
        }

        lval z: R|kotlin/Int| = when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
            ==($subj$, Q|B|) ->  {
                Int(2)
            }
            ==($subj$, Null(null)) ->  {
                Int(3)
            }
        }

    }
    public final fun test_3(base: R|Base|): R|kotlin/Unit| {
        when (R|<local>/base|) {
            ($subj$ is R|A|) ->  {
                Int(1)
            }
        }

    }