mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Introduce solidity-next pragma
Exclude pragma experimental error from ANTLR tests Test for first pragma after non-pragma declaration Resolve import pragmas Change pragma name from next to solidity Add Changelog entries Address review comments
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
pragma experimental solidity;
|
||||
// ----
|
||||
// Warning 2264: (0-29): Experimental features are turned on. Do not use experimental features on live deployments.
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
==== Source: A.sol ====
|
||||
contract A {}
|
||||
==== Source: B.sol ====
|
||||
pragma experimental solidity;
|
||||
import "A.sol";
|
||||
contract B {
|
||||
A a;
|
||||
}
|
||||
==== Source: C.sol ====
|
||||
pragma experimental solidity;
|
||||
import "A.sol";
|
||||
contract C {
|
||||
A a;
|
||||
}
|
||||
==== Source: D.sol ====
|
||||
pragma experimental solidity;
|
||||
import "A.sol";
|
||||
contract D {
|
||||
A a;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2141: (B.sol:0-29): File declares "pragma experimental solidity". If you want to enable the experimental mode, all source units must include the pragma.
|
||||
// ParserError 2141: (C.sol:0-29): File declares "pragma experimental solidity". If you want to enable the experimental mode, all source units must include the pragma.
|
||||
// ParserError 2141: (D.sol:0-29): File declares "pragma experimental solidity". If you want to enable the experimental mode, all source units must include the pragma.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract A {}
|
||||
|
||||
pragma experimental solidity;
|
||||
// ----
|
||||
// ParserError 8185: (45-45): Experimental pragma "solidity" can only be set at the beginning of the source unit.
|
||||
@@ -0,0 +1,13 @@
|
||||
function f() pure returns (uint)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
pragma experimental solidity;
|
||||
|
||||
struct A
|
||||
{
|
||||
uint256 x;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8185: (83-89): Experimental pragma "solidity" can only be set at the beginning of the source unit.
|
||||
Reference in New Issue
Block a user