Skip to content

Instantly share code, notes, and snippets.

@rolandkofler
Created August 13, 2018 12:41
Show Gist options
  • Save rolandkofler/e3bf9f81c67810155079b856631364c4 to your computer and use it in GitHub Desktop.
Save rolandkofler/e3bf9f81c67810155079b856631364c4 to your computer and use it in GitHub Desktop.
Tests the inheritance linearization in solidity
contract A {
function _a(){
emit PrintA();
}
event PrintA();
}
contract B is A {
function _a(){
emit PrintB();
super._a();
}
event PrintB();
}
contract C is A{
function _a(){
emit PrintC();
super._a();
}
event PrintC();
}
contract D is B, C {
function _a(){
emit PrintD();
super._a();
}
event PrintD();
}
contract E is C, B {
function _a(){
emit PrintE();
super._a();
}
event PrintE();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment