Add test for file level `using for` statements (#831)

pull/832/head
cgewecke 10 months ago committed by GitHub
parent a6674c66fe
commit 70de9d452b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      test/integration/projects/solc-8/contracts/Contract_solc8.sol
  2. 9
      test/integration/projects/solc-8/contracts/Library_solc8.sol

@ -2,10 +2,13 @@
pragma solidity >=0.8.0 <0.9.0;
pragma abicoder v2;
import "./Library_solc8.sol";
error InvalidSomeAddress(address someAddress);
contract ContractA {
using Library_solc8 for uint256;
contract ContractA {
mapping(bytes32 key => uint256) public authorization;
address public someAddress;

@ -0,0 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
library Library_solc8 {
uint constant x = 1;
function a() public view returns (uint) {
return x;
}
}
Loading…
Cancel
Save