relax constructor constraint within declarations

This commit is contained in:
Renaud Pawlak 2017-07-27 07:13:30 +02:00
parent 05c06ccb75
commit 62546dd336

View File

@ -2092,7 +2092,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
print(";");
}
} else {
if (getScope().interfaceScope) {
if (!getScope().declareClassScope && getScope().interfaceScope) {
if (!methodDecl.mods.getFlags().contains(Modifier.STATIC)) {
report(methodDecl, methodDecl.name, JSweetProblem.INVALID_METHOD_BODY_IN_INTERFACE, methodDecl.name,
parent == null ? "<no class>" : parent.name);