From the output, first reading looks okay.
But the second reading (where addr1 is passed to somefn), the value of addr and _a inside somefn() are not the same.
The third reading passes addr1 directly to hcl.scalar (not going though somefn) and this seems to be right.
Sorry -- ignore. Of course just as a filed, occurred to me what I was doing wrong. Should be passing addr[0] to somefn instead of doing addr[0] from inside somefn.
Code:
Output:
From the output, first reading looks okay. But the second reading (where addr1 is passed to somefn), the value of addr and _a inside somefn() are not the same.
The third reading passes addr1 directly to hcl.scalar (not going though somefn) and this seems to be right.