Skip to content

Commit 70de9d4

Browse files
authored
Add test for file level using for statements (#831)
1 parent a6674c6 commit 70de9d4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

test/integration/projects/solc-8/contracts/Contract_solc8.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
pragma solidity >=0.8.0 <0.9.0;
33
pragma abicoder v2;
44

5+
import "./Library_solc8.sol";
6+
57
error InvalidSomeAddress(address someAddress);
68

7-
contract ContractA {
9+
using Library_solc8 for uint256;
810

11+
contract ContractA {
912
mapping(bytes32 key => uint256) public authorization;
1013
address public someAddress;
1114

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity >=0.8.0 <0.9.0;
3+
4+
library Library_solc8 {
5+
uint constant x = 1;
6+
function a() public view returns (uint) {
7+
return x;
8+
}
9+
}

0 commit comments

Comments
 (0)