[Bug]: TMP variables storing results of blockhash function have wrong type
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the issue:
The `blockhash` function returns a value of type `bytes32`. But the IR generated from a call to `blockhash` stores its result in a Temp variable of type `uint32`.
### Code example to reproduce the issue:
```
contract Test {
function test() external returns(bytes32) {
bytes32 a = blockhash(block.number);
return a;
}
}
```
### Version:
0.9.3
### Relevant log output:
```shell
Function Test.test() (*)
Expression: a = blockhash(uint256)(block.number)
IRs:
TMP_0(uint256) = SOLIDITY_CALL blockhash(uint256)(block.number)
a(bytes32) := TMP_0(uint256)
Expression: a
IRs:
RETURN a
```
Contributor guide
Assessment
This issue has not been assessed yet.