Instrumenting a library with fixed bytes keys causes an error
cd1m0 opened this issue · 1 comments
cd1m0 commented
Given the following sample:
contract Foo {
mapping (bytes19 => address) m;
/// #if_succeeds forall(bytes19 i in m) m[i] != address(0);
function foo() public {}
}
We get the following exception:
Error: Unknown type bytes19 in getTypeDesc
at getTypeDesc (/home/dimo/work/consensys/scribble/dist/instrumenter/utils.js:247:11)
at generateMapLibrary (/home/dimo/work/consensys/scribble/dist/instrumenter/custom_maps_templates.js:209:48)
at TypesToLibraryMap.makeNew (/home/dimo/work/consensys/scribble/dist/instrumenter/instrumentation_context.js:99:68)
at TypesToLibraryMap.get (/home/dimo/work/consensys/scribble/dist/instrumenter/utils.js:213:24)
at interposeMap (/home/dimo/work/consensys/scribble/dist/instrumenter/custom_maps.js:203:48)
at instrumentFiles (/home/dimo/work/consensys/scribble/dist/bin/scribble.js:165:40)
at /home/dimo/work/consensys/scribble/dist/bin/scribble.js:642:13
The root cause is that the case for fixed bytes is missing in the getTypeDesc
function. Just add that and it works