aeternity / aesophia

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

parent interfaces need to be explicitely implemented in the main contract #454

Closed marc0olo closed 1 year ago

marc0olo commented 1 year ago

I expected to be the parent interface indirectly known by the main contract. I am not sure if this is intended behavior to require it to be implemented explicitely.

I can't recall the case 100% right now, but I am pretty sure I experienced this.

assuming interface A inherits from B, I would still need to implement both, A and B, explicitely in the main contract.

radrow commented 1 year ago

Can you craft a minimal example?

ghallak commented 1 year ago

@marc0olo Are you talking about the case in this example where you have to explicitly redeclare the functions from the parent interface?

marc0olo commented 1 year ago

@marc0olo Are you talking about the case in this example where you have to explicitly redeclare the functions from the parent interface?

yeah I think that describes it. is there a specific reason it is like that? I assume this is on purpose then (sorry, I didn't check the docs yet)

radrow commented 1 year ago

This is done on purpose for the sake of explicitness. Note that interfaces are entirely abstract and they don't provide implementation.