Remove unnecessary isJsOverlayImplementation check.
@@ -43,11 +43,9 @@ public class ImplementInstanceInitialization extends NormalizationPass {
/** Implements the instance initialization method. */
private void implementInitMethod(Type type) {
- if (!type.isJsOverlayImplementation()) {
checkArgument(!type.isInterface());
List<Statement> statements =
- type.getInstanceInitializerBlocks()
- .stream()
+ type.getInstanceInitializerBlocks().stream()
.flatMap(initializerBlock -> initializerBlock.getBlock().getStatements().stream())
.collect(Collectors.toList());
@@ -57,7 +55,7 @@ public class ImplementInstanceInitialization extends NormalizationPass {
.addStatements(statements)
.setSourcePosition(type.getSourcePosition())
.build());
- }
+
type.getMembers().removeIf(member -> member.isInitializerBlock() && !member.isStatic());
}
