Commit d3877d2
authored
Redo in narrowing for intersections (microsoft#39637)
* Redo in-narrowing for intersections
Still need to carve out an exception for globalThis
* exempt globalThis from `in` narrowing1 parent 32934a9 commit d3877d2Copy full SHA for d3877d2
6 files changed
+72-6Lines changed: 72 additions & 6 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src/compiler
- tests
- baselines/reference
- cases/compiler
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21475 | 21475 | |
21476 | 21476 | |
21477 | 21477 | |
21478 | | - |
| 21478 | + |
| 21479 | + |
| 21480 | + |
21479 | 21481 | |
21480 | 21482 | |
21481 | 21483 | |
|
Collapse file
tests/baselines/reference/inKeywordTypeguard.errors.txt
Copy file name to clipboardExpand all lines: tests/baselines/reference/inKeywordTypeguard.errors.txt+8-4Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | | - |
23 | 22 | |
24 | 23 | |
25 | | - |
| 24 | + |
26 | 25 | |
27 | 26 | |
28 | 27 | |
| ||
164 | 163 | |
165 | 164 | |
166 | 165 | |
167 | | - |
168 | | - |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
169 | 173 | |
170 | 174 | |
171 | 175 | |
Collapse file
tests/baselines/reference/inKeywordTypeguard.js
Copy file name to clipboardExpand all lines: tests/baselines/reference/inKeywordTypeguard.js+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
104 | 104 | |
105 | 105 | |
106 | 106 | |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
107 | 114 | |
108 | 115 | |
109 | 116 | |
| ||
245 | 252 | |
246 | 253 | |
247 | 254 | |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
Collapse file
tests/baselines/reference/inKeywordTypeguard.symbols
Copy file name to clipboardExpand all lines: tests/baselines/reference/inKeywordTypeguard.symbols+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
261 | 261 | |
262 | 262 | |
263 | 263 | |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
264 | 282 | |
Collapse file
tests/baselines/reference/inKeywordTypeguard.types
Copy file name to clipboardExpand all lines: tests/baselines/reference/inKeywordTypeguard.types+21-1Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
318 | 318 | |
319 | 319 | |
320 | 320 | |
321 | | - |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
| 341 | + |
322 | 342 | |
323 | 343 | |
324 | 344 | |
Collapse file
tests/cases/compiler/inKeywordTypeguard.ts
Copy file name to clipboardExpand all lines: tests/cases/compiler/inKeywordTypeguard.ts+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
103 | 103 | |
104 | 104 | |
105 | 105 | |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
0 commit comments