If the project includes a contract where the constructor takes a struct that itself contains an array of structs, kontrol build fails with the error:
ValueError: Array length bounds missing for <struct member>
This happens despite the fact that when array length bounds are not specified, they should default to 1, and it happens even if the bounds are specified using an annotation such as
/// @custom:kontrol-array-length-equals <struct member>: 10,`
This issue can be reproduced with the following minimal example:
pragma solidity ^0.8.17;
struct DeploymentParameters {
Parameters[] parameters;
}
struct Parameters {
uint256 value;
}
contract ArrayStructContract {
constructor(DeploymentParameters memory) {
// Do something
}
}
Note that this only happens with constructors. If the constructor above is replaced with a function, kontrol build works. It also works if the Parameters[] array is replaced with a non-struct array such as uint256[].