aeternity / aesophia

Stand alone compiler for the Sophia smart contract language
https://docs.aeternity.com/aesophia
ISC License
51 stars 19 forks source link

Solve constraints together and in the order they are added #360

Closed ghallak closed 2 years ago

ghallak commented 2 years ago

Fixes: #358

This solution works by trying to find the named argument constraint (if any) that is causing the dereferencing of the record type in the field constraint to fail, and solve that, then it will try to dereference the record type again. This way the constraints won't be solved out of order.

This implements the solution mentioned in this comment https://github.com/aeternity/aesophia/issues/358#issuecomment-986550847