We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 801fd7e commit fcae5a2Copy full SHA for fcae5a2
src/nodes/utils/ArrayElementNode.js
@@ -63,8 +63,10 @@ class ArrayElementNode extends Node { // @TODO: If extending from TempNode it br
63
64
generate( builder ) {
65
66
+ const indexType = this.indexNode.getNodeType( builder );
67
+
68
const nodeSnippet = this.node.build( builder );
- const indexSnippet = this.indexNode.build( builder, 'uint' );
69
+ const indexSnippet = this.indexNode.build( builder, indexType === 'int' ? indexType : 'uint' );
70
71
return `${ nodeSnippet }[ ${ indexSnippet } ]`;
72
0 commit comments