We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 415c725 commit 0c5471bCopy full SHA for 0c5471b
tests/cases/compiler/narrowingOfDottedNames.ts
@@ -57,3 +57,36 @@ class Foo2
57
constructor() {
58
}
59
60
+
61
+// Repro from #29513
62
63
+class AInfo {
64
+ a_count: number = 1;
65
+}
66
67
+class BInfo {
68
+ b_count: number = 1;
69
70
71
+class Base {
72
+ id: number = 0;
73
74
75
+class A2 extends Base {
76
+ info!: AInfo;
77
78
79
+class B2 extends Base {
80
+ info!: BInfo;
81
82
83
+let target: Base = null as any;
84
85
+while (target) {
86
+ if (target instanceof A2) {
87
+ target.info.a_count = 3;
88
+ }
89
+ else if (target instanceof B2) {
90
+ const j: BInfo = target.info;
91
92
0 commit comments