Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/nodes/math/OperatorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ class OperatorNode extends TempNode {
* and the input node types.
*
* @param {NodeBuilder} builder - The current node builder.
* @param {?string} [output=null] - The output type.
* @return {string} The node type.
*/
getNodeType( builder ) {
getNodeType( builder, output = null ) {

const op = this.op;

Expand All @@ -117,7 +118,7 @@ class OperatorNode extends TempNode {

if ( typeA === 'void' || typeB === 'void' ) {

return 'void';
return output || 'void';

} else if ( op === '%' ) {

Expand Down Expand Up @@ -193,7 +194,7 @@ class OperatorNode extends TempNode {

const { aNode, bNode } = this;

const type = this.getNodeType( builder );
const type = this.getNodeType( builder, output );

let typeA = null;
let typeB = null;
Expand Down
Loading