diff --git a/tests/test_ssa_generation.py b/tests/test_ssa_generation.py index 00d2f23fd4..2a91045bfb 100644 --- a/tests/test_ssa_generation.py +++ b/tests/test_ssa_generation.py @@ -9,6 +9,7 @@ from typing import Union, List, Optional import pytest +from slither.core.solidity_types import ArrayType from solc_select import solc_select from solc_select.solc_select import valid_version as solc_valid_version @@ -1077,3 +1078,20 @@ def test_issue_1748(): operations = f.slithir_operations assign_op = operations[0] assert isinstance(assign_op, InitArray) + + +def test_issue_1776(): + source = """ + contract Contract { + function foo() public returns (uint) { + uint[] memory arr = new uint[](2); + return 0; + } + } + """ + with slither_from_source(source) as slither: + c = slither.get_contract_from_name("Contract")[0] + f = c.functions[0] + operations = f.slithir_operations + assign_op = operations[0] + assert isinstance(assign_op.lvalue.type, ArrayType)