Skip to content

Commit 38f9e1c

Browse files
trevoradecopybara-github
authored andcommitted
Preserve legacy static super rewriting behavior.
PiperOrigin-RevId: 825761516
1 parent f6f0a29 commit 38f9e1c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/com/google/javascript/jscomp/Es6NormalizeClasses.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ private String generateUniqueStaticInitMethodName(NodeTraversal t) {
106106
transpileClassFields = options.needsTranspilationOf(Feature.PUBLIC_CLASS_FIELDS);
107107

108108
// Written this way for historical consistency. Before this comment was added, if SUPER needed
109-
// transpilation, Es6ConvertSuper would do a strict rewrite. Otherwise if the option says to
110-
// assumeStaticInheritanceIsNotUsed, StaticSuperPropReplacer (now deleted) would do a non-strict
111-
// rewrite.
109+
// transpilation, Es6ConvertSuper would do a strict rewrite. Otherwise if the options indicate
110+
// to not skipNonTranspilationPasses and assumeStaticInheritanceIsNotUsed,
111+
// StaticSuperPropReplacer (now deleted) would do a non-strict rewrite.
112112
rewriteStaticSuperStrictly =
113113
options.needsTranspilationOf(Feature.SUPER)
114+
|| options.skipNonTranspilationPasses
114115
|| !options.getAssumeStaticInheritanceIsNotUsed();
115116
}
116117

0 commit comments

Comments
 (0)