Skip to content

Instantly share code, notes, and snippets.

@duncancmt
Created April 17, 2025 19:01
Show Gist options
  • Save duncancmt/59fcbef233f8076d5d46e018f1cf0a97 to your computer and use it in GitHub Desktop.
Save duncancmt/59fcbef233f8076d5d46e018f1cf0a97 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;
abstract contract CommonBase {
function foo() external pure virtual returns (string memory) {
return "bar";
}
}
abstract contract BaseA is CommonBase {}
abstract contract BaseB is CommonBase {
function foo() external pure override returns (string memory) {
return "baz";
}
}
contract Derived is BaseA, BaseB {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment