You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
struct my_struct {
uint[][] a; // works fine
uint[][3] b; // works fine
uint[3][] c; // fails
uint[3][3] d; // fails
uint[2**20] e; // works fine
}
contract BaseContract{
struct my_struct_2 {
uint[][] f; // works fine
uint[][3] g; // works fine
uint[3][] h; // works fine
uint[3][3] i; // works fine
uint[2**20] j; // works fine
}
uint[3][] k; // works fine
}
Version:
0.8.3
Relevant log output:
Error in a.sol Traceback (most recent call last): File "/home/plotchy/code/packages/slither/slither/main.py", line 755, in main_impl ) = process_all(filename, args, detector_classes, printer_classes) File "/home/plotchy/code/packages/slither/slither/main.py", line 87, in process_all ) = process_single(compilation, args, detector_classes, printer_classes) File "/home/plotchy/code/packages/slither/slither/main.py", line 70, in process_single slither = Slither(target, ast_format=ast, **vars(args)) File "/home/plotchy/code/packages/slither/slither/slither.py", line 118, in init parser.parse_contracts() File "/home/plotchy/code/packages/slither/slither/solc_parsing/slither_compilation_unit_solc.py", line 485, in parse_contracts self._analyze_second_part(contracts_to_be_analyzed, libraries) File "/home/plotchy/code/packages/slither/slither/solc_parsing/slither_compilation_unit_solc.py", line 553, in _analyze_second_part self._analyze_top_level_structures() File "/home/plotchy/code/packages/slither/slither/solc_parsing/slither_compilation_unit_solc.py", line 631, in _analyze_top_level_structures struct.analyze() File "/home/plotchy/code/packages/slither/slither/solc_parsing/declarations/structure_top_level.py", line 57, in analyze elem_parser.analyze(self) File "/home/plotchy/code/packages/slither/slither/solc_parsing/variables/variable_declaration.py", line 210, in analyze self._variable.type = parse_type(self._elem_to_parse, caller_context) File "/home/plotchy/code/packages/slither/slither/solc_parsing/solidity_types/type_parsing.py", line 401, in parse_type array_type = parse_type(t["baseType"], next_context) File "/home/plotchy/code/packages/slither/slither/solc_parsing/solidity_types/type_parsing.py", line 400, in parse_type length = parse_expression(t["length"], caller_context) File "/home/plotchy/code/packages/slither/slither/solc_parsing/expressions/expression_parsing.py", line 255, in parse_expression assert isinstance(caller_context, CallerContextExpression) AssertionError
The text was updated successfully, but these errors were encountered:
Describe the issue:
Testing parser on various types and noticed this particular type fails to be parsed.
Type is used in solidity docs as
bool[2][] pairsOfFlags;
https://docs.soliditylang.org/en/latest/types.html?highlight=array#allocating-memory-arrays
Code example to reproduce the issue:
Version:
0.8.3
Relevant log output:
The text was updated successfully, but these errors were encountered: