Community
Participate
Working Groups
The egl content in GridLayout function initTable() if ( columns == 0 || rows == 0 ) is generated to if (({eze$$value : this.getColumns(), eze$$signature : "I;"}.compareTo({eze$$value : 0, eze$$signature : "i;"}) == 0) || ({eze$$value : this.getRows(), eze$$signature : "I;"}.compareTo({eze$$value : 0, eze$$signature : "i;"}) == 0))) The {eze$$value : this.getColumns(), eze$$signature : "I;"}.compareTo throws an exception. Should be ({eze$$value : this.getColumns(), eze$$signature : "I;"}).compareTo Reproducible: always
Hi Scott, The problem happens in BinaryExpressionTemplate, genExpression When it runs ctx.invoke(genBinaryExpression, (Type) binExpr.getOperation().getContainer(), ctx, out, binExpr), the BooleanTypeTemplate is invoked first, and then NumTypeTemplate is invokded I test the previous correctly build, the IntTypeTemplate should be invoked instead of NumTypeTemplate. I think the problem is in the following codes in genExpression function of BinaryExpressionTemplate if (CommonUtilities.needsConversion(expr.getRHS().getType(), expr.getLHS().getType())) { IRUtils.makeCompatible(binExpr, expr.getLHS().getType(), expr.getRHS().getType()); } IRUtils.makeCompatible converts the int/smallint type to num type. In previous version, the int/smallint type are converted to int type. Thus this may be an IR problem. The correctly generated js for that line of code is simply as: this.getColumns() == 0
Verified in 201109192102