Commit ef5d729
Add test case showing JSCompiler transpilation of class inheritance within a local scope
We could optionally simplify the output by detecting that C's constructor does not return a value, and producing:
let D = function() {
C.apply(this, arguments);
}
Today this detection only works on globals/module exports, not function local classes.
This probably doesn't matter for normal code, but @closureUnaware code is always wrapped in a function.
PiperOrigin-RevId: 8462980041 parent aae006c commit ef5d729
1 file changed
+24
-0
lines changedLines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
696 | 720 | | |
697 | 721 | | |
698 | 722 | | |
| |||
0 commit comments