Skip to content

Commit 7a7df30

Browse files
committed
"construct" for nonqualified classes
1 parent 6c359e8 commit 7a7df30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/net.sf.j2s.core/src/net/sf/j2s/core/astvisitors/ASTScriptVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ public boolean visit(MethodDeclaration node) {
11891189
return false;
11901190
}
11911191
String name = (isConstructor ? "construct" : getJ2SName(node.getName())) + getJ2SParamQualifier(null, mBinding);
1192-
if (name.equals("construct"))
1192+
if (isConstructor && name.equals("construct"))
11931193
defaultConstructor = mBinding; // in case we are not qualifying names here
11941194
buffer.append("\r\nClazz.newMethod$(C$, '").append(name).append("', ").append("function (");
11951195
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)