this post was submitted on 19 Jun 2023
4 points (83.3% liked)

cryptocurrency

2677 readers
3 users here now

The largest cryptocurrency community on the Fediverse!

Lemmy community dedicated to cryptocurrency news, technicals, education, memes and so more!

💬 Chat on Community Improvements and Development

Community Knowledge Base:

Be nice, have fun.

Community rules:

General lemmy.ml instance rules applicable here too.

Ugly brother of this community: bωockchain

For a community devoted to cryptography itself, visit c/cryptography

founded 5 years ago
MODERATORS
 
top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 years ago

It was a challenge about inheritance. The correct answer is ‘bananas’ because when a function is called that is defined multiple times in different contracts, parent contracts are searched from right to left. The override(Ship_B, Ship_A) part gives the false impression of a locally determined inheritance ordering, but it does not actually influence it.

[–] Lixen 0 points 2 years ago* (last edited 2 years ago)

Nice challenge!

spoilerSeems like the last mentioned contract in the is Ship_A, Ship_B part determines which one super refers to when they have matching function names.