Commit 5754639
committed
Support synthesized SourceFile parent in getOrCreateEmitNode (#24709)
getOrCreateEmitNode() assumes that the SourceFile of node that is
part of a parse tree will also be a parse tree node. This assumption is
not valid for a transformed SourceFile. disposeEmitNodes() already handles
this case by getting the original SourceFile node if the provided node
is synthesized, so do the same in getOrCreateEmitNode().
This results in the test case in #24709 to run without error.1 parent e2100cd commit 5754639
File tree
3 files changed
+47
-1
lines changed- src
- compiler
- testRunner/unittests
- tests/baselines/reference/transformApi
3 files changed
+47
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2819 | 2819 | | |
2820 | 2820 | | |
2821 | 2821 | | |
2822 | | - | |
| 2822 | + | |
2823 | 2823 | | |
2824 | 2824 | | |
2825 | 2825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
403 | 443 | | |
404 | 444 | | |
405 | 445 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments