TypeScript/tests/baselines/reference/controlFlowSuperPropertyAccess.types
Anders Hejlsberg 412ecbc291
Reduce void | undefined only in conjunction with subtype reduction (#42846)
* Reduce void | undefined only in conjunction with subtype reduction

* Accept new baselines

* Add regression test
2021-02-17 14:48:07 -10:00

27 lines
472 B
Plaintext

=== tests/cases/conformance/controlFlow/controlFlowSuperPropertyAccess.ts ===
class B {
>B : B
protected m?(): void;
>m : (() => void) | undefined
}
class C extends B {
>C : C
>B : B
body() {
>body : () => void
super.m && super.m();
>super.m && super.m() : void | undefined
>super.m : (() => void) | undefined
>super : B
>m : (() => void) | undefined
>super.m() : void
>super.m : () => void
>super : B
>m : () => void
}
}