Skip to content

Instantly share code, notes, and snippets.

@jO-Osko
Created July 3, 2024 09:21
Show Gist options
  • Save jO-Osko/7e4663fdc56c17472b68a66d59bc371c to your computer and use it in GitHub Desktop.
Save jO-Osko/7e4663fdc56c17472b68a66d59bc371c to your computer and use it in GitHub Desktop.
// 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