flintrocks / flint

The Flint Programming Language for Smart Contracts
MIT License
2 stars 0 forks source link

Make structures stub-able #79

Closed nvgrw closed 6 years ago

nvgrw commented 6 years ago

Structures cannot be stubbed because we cannot have one structure inherit from another structure. Therefore we need to define protocols that correspond to the public interfaces of the structures and mock and pass those around instead. This is a big refactoring job but should not change the behaviour of anything.

The protocols should be named StructNameProtocol, for each structure named StructName.

nvgrw commented 6 years ago

I've decided that this probably makes more sense to do incrementally as we write the tests.