Open
Description
Description
This makes the plugin report test as returning a hash:
FUNCTION test
a = hash()
a = (a.keys()).toArray()
arr = (a.keys()).toArray()
return, a
END
The plugin knows what's going on with the calls to .keys() and .toArray() though, b/c if you change the last line to
return, arr
then the function is reported as returning an array. I realise it may be tricky from a parsing perspective, but it would be nice if types could be updated upon reassignments.
Why it Matters
Reassignments should update the type info for a variable, as it is not uncommon to e.g., reuse the same variable name after changing the type. But consider this a "weak" feature request, the workaround using a new variable name is semi-obvious.
Suggested Behavior
In the example above, the type of variable a should be changed during the reassignment.
Alternate Behavior
No response