mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Infrastructure for extracting syntax tests in separate test files.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
contract test {
|
||||
uint256 variable;
|
||||
uint128 variable;
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: Identifier already declared.
|
||||
@@ -0,0 +1,8 @@
|
||||
contract test {
|
||||
function f() pure public {
|
||||
uint256 x;
|
||||
if (true) { uint256 x; }
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: Identifier already declared.
|
||||
@@ -0,0 +1,11 @@
|
||||
pragma experimental "v0.5.0";
|
||||
contract test {
|
||||
function f() pure public {
|
||||
uint256 x;
|
||||
if (true) { uint256 x; }
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: This declaration shadows an existing declaration.
|
||||
// Warning: Unused local variable.
|
||||
// Warning: Unused local variable.
|
||||
@@ -0,0 +1,6 @@
|
||||
contract test {
|
||||
uint256 stateVariable1;
|
||||
function fun(uint256 arg1) public { uint256 y; y = arg1; }
|
||||
}
|
||||
// ----
|
||||
// Warning: Function state mutability can be restricted to pure
|
||||
Reference in New Issue
Block a user