Commit c50a6f7
committed
Fix comment emit for namespaces & enums.
Keep emit flags set on the original node on a namespace or enum node.
This prevents dropping flags like NoComments, which caused duplicated
comment emits.
Additionally, TypeScript would emit synthetic comments twice, once for
the variable declaration, once for the module statement. This explicitly
clears away synthetic comments on namespaces and enums if their
synthetic comments have already been emitted on the corresponding
variable statement.1 parent a7224ec commit c50a6f7
3 files changed
Lines changed: 47 additions & 5 deletions
File tree
- src
- compiler/transformers
- testRunner/unittests
- tests/baselines/reference/transformApi
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2633 | 2633 | | |
2634 | 2634 | | |
2635 | 2635 | | |
2636 | | - | |
| 2636 | + | |
| 2637 | + | |
2637 | 2638 | | |
2638 | 2639 | | |
2639 | 2640 | | |
| |||
2691 | 2692 | | |
2692 | 2693 | | |
2693 | 2694 | | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
2694 | 2700 | | |
2695 | | - | |
| 2701 | + | |
2696 | 2702 | | |
2697 | 2703 | | |
2698 | 2704 | | |
| |||
2882 | 2888 | | |
2883 | 2889 | | |
2884 | 2890 | | |
2885 | | - | |
| 2891 | + | |
2886 | 2892 | | |
2887 | 2893 | | |
2888 | 2894 | | |
| |||
2922 | 2928 | | |
2923 | 2929 | | |
2924 | 2930 | | |
2925 | | - | |
| 2931 | + | |
| 2932 | + | |
2926 | 2933 | | |
2927 | 2934 | | |
2928 | 2935 | | |
| |||
2979 | 2986 | | |
2980 | 2987 | | |
2981 | 2988 | | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
2982 | 2994 | | |
2983 | | - | |
| 2995 | + | |
2984 | 2996 | | |
2985 | 2997 | | |
2986 | 2998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
360 | 381 | | |
361 | 382 | | |
362 | 383 | | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments