Closed zerbina closed 3 months ago
Prior to #1382, sighashes.hashType
was also used by the C code generator for merging types, which meant that:
var x: (int, (int, int))
var y: (int, (int,), int)
y[2] = 1
resulted in a C compiler error, due to y
using the same C type as x
, which is:
struct tyTuple__xxx1 {
NI Field0;
NI Field1;
};
struct tyTuple__xxx2 {
NI Field0;
tyTuple__xxx1 Field1;
};
/merge
Merge requested by: @saem
Contents after the first section break of the PR description has been removed and preserved below:
## Notes for Reviewers * a severe, long-standing issue * discovered while investigating the test failures from #1400
Summary
((A, B),)
and((A,), B)
being assigned the the same set of hooksDetails
sighash
), so that((A,), B)
and((A, B),)
result in two differentSigHash
esliftdestructors
usessighashes
for canonicalizing structural types, thus previously treating said tuples as the same typeSigHash
, was affected in the same way