Created
July 3, 2024 09:21
-
-
Save jO-Osko/7e4663fdc56c17472b68a66d59bc371c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
enum A { | |
X,Y,Z | |
} | |
contract K { | |
} | |
contract B is K { | |
function isX(A a) public pure returns(uint256){ | |
if(a == A.X){ | |
return 1; | |
} | |
return 2; | |
} | |
function call(address z) public view returns(uint256){ | |
return B(z).isX(A.Y); | |
} | |
function a(K k) public pure {} | |
// function a(address payable b) public pure {} | |
} | |
interface ISome { | |
function a() external returns(K); | |
} | |
contract Some is ISome { | |
// B public override a; | |
function a() external override pure returns(K){ | |
return B(address(0)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment