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

Closed
opened 2023-05-23 21:04:39 +09:00 by zxq9 · 4 comments
zxq9 commented 2023-05-23 21:04:39 +09:00 (Migrated from gitlab.com)

Created by: marc0olo

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.

*Created by: marc0olo* 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.
zxq9 commented 2023-05-24 03:21:10 +09:00 (Migrated from gitlab.com)

Created by: radrow

Can you craft a minimal example?

*Created by: radrow* Can you craft a minimal example?
ghallak commented 2023-05-26 23:40:31 +09:00 (Migrated from gitlab.com)

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

@marc0olo Are you talking about the case in [this example](https://github.com/aeternity/aesophia/blob/master/test/contracts/polymorphism_contract_interface_extends_interface.aes) where you have to explicitly redeclare the functions from the parent interface?
zxq9 commented 2023-05-28 05:37:04 +09:00 (Migrated from gitlab.com)

Created by: marc0olo

@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)

*Created by: marc0olo* > @marc0olo Are you talking about the case in [this example](https://github.com/aeternity/aesophia/blob/master/test/contracts/polymorphism_contract_interface_extends_interface.aes) 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)
zxq9 commented 2023-06-15 03:30:09 +09:00 (Migrated from gitlab.com)

Created by: radrow

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

*Created by: radrow* This is done on purpose for the sake of explicitness. Note that interfaces are entirely abstract and they don't provide implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#454