aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog.md1
-rw-r--r--docs/frequently-asked-questions.rst87
-rw-r--r--docs/introduction-to-smart-contracts.rst44
-rw-r--r--docs/style-guide.rst68
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp2
-rw-r--r--libsolidity/analysis/ReferencesResolver.h1
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp6
-rw-r--r--libsolidity/codegen/ABIFunctions.cpp3
-rw-r--r--test/libsolidity/ASTJSON/documentation.json2
-rw-r--r--test/libsolidity/ASTJSON/documentation_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/function_type.json6
-rw-r--r--test/libsolidity/ASTJSON/function_type_legacy.json6
-rw-r--r--test/libsolidity/ASTJSON/long_type_name_binary_operation.json2
-rw-r--r--test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/long_type_name_identifier.json2
-rw-r--r--test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/modifier_definition.json2
-rw-r--r--test/libsolidity/ASTJSON/modifier_definition_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/modifier_invocation.json2
-rw-r--r--test/libsolidity/ASTJSON/modifier_invocation_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/non_utf8.json2
-rw-r--r--test/libsolidity/ASTJSON/non_utf8_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/short_type_name.json2
-rw-r--r--test/libsolidity/ASTJSON/short_type_name_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/short_type_name_ref.json2
-rw-r--r--test/libsolidity/ASTJSON/short_type_name_ref_legacy.json2
-rw-r--r--test/libsolidity/ASTJSON/source_location.json2
-rw-r--r--test/libsolidity/ASTJSON/source_location_legacy.json2
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp38
-rw-r--r--test/libsolidity/syntaxTests/constants/assign_constant_function_value_050.sol8
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol7
-rw-r--r--test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol6
-rw-r--r--test/libsolidity/syntaxTests/modifiers/modifiers_on_abstract_functions_050.sol10
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol7
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol8
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol1
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol10
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol11
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol9
-rw-r--r--test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol5
-rw-r--r--test/libsolidity/syntaxTests/tupleAssignments/large_component_count.sol1
-rw-r--r--test/libsolidity/syntaxTests/visibility/interface/function_external.sol (renamed from test/libsolidity/syntaxTests/visibility/interface/function_external050.sol)1
-rw-r--r--test/libsolidity/syntaxTests/visibility/interface/function_public050.sol6
52 files changed, 139 insertions, 276 deletions
diff --git a/Changelog.md b/Changelog.md
index 1cc2ee4a..aa2dce18 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -33,6 +33,7 @@ Breaking Changes:
* General: Remove assembly instruction aliases ``sha3`` and ``suicide``
* General: C99-style scoping rules are enforced now. This was already the case in the experimental 0.5.0 mode.
* General: Disallow combining hex numbers with unit denominations (e.g. ``0x1e wei``). This was already the case in the experimental 0.5.0 mode.
+ * JSON AST: Remove ``constant`` and ``payable`` fields (the information is encoded in the ``stateMutability`` field).
* Name Resolver: Do not exclude public state variables when looking for conflicting declarations.
* Optimizer: Remove the no-op ``PUSH1 0 NOT AND`` sequence.
* Parser: Disallow trailing dots that are not followed by a number.
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index c2df0d3a..786c3341 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -9,22 +9,12 @@ This list was originally compiled by `fivedogit <mailto:fivedogit@gmail.com>`_.
Basic Questions
***************
-Is it possible to do something on a specific block number? (e.g. publish a contract or execute a transaction)
-=============================================================================================================
-
-Transactions are not guaranteed to happen on the next block or any future
-specific block, since it is up to the miners to include transactions and not up
-to the submitter of the transaction. This applies to function calls/transactions and contract
-creation transactions.
-
-If you want to schedule future calls of your contract, you can use the
-`alarm clock <http://www.ethereum-alarm-clock.com/>`_.
-
What is the transaction "payload"?
==================================
This is just the bytecode "data" sent along with the request.
+
Create a contract that can be killed and return funds
=====================================================
@@ -167,11 +157,6 @@ arguments for you.
See `ping.sol <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/45_ping.sol>`_ and
`pong.sol <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/45_pong.sol>`_.
-Is unused gas automatically refunded?
-=====================================
-
-Yes and it is immediate, i.e. done as part of the transaction.
-
When returning a value of say ``uint`` type, is it possible to return an ``undefined`` or "null"-like value?
============================================================================================================
@@ -229,76 +214,6 @@ No, a function call from one contract to another does not create its own transac
you have to look in the overall transaction. This is also the reason why several
block explorer do not show Ether sent between contracts correctly.
-What is the ``memory`` keyword? What does it do?
-================================================
-
-The Ethereum Virtual Machine has three areas where it can store items.
-
-The first is "storage", where all the contract state variables reside.
-Every contract has its own storage and it is persistent between function calls
-and quite expensive to use.
-
-The second is "memory", this is used to hold temporary values. It
-is erased between (external) function calls and is cheaper to use.
-
-The third one is the stack, which is used to hold small local variables.
-It is almost free to use, but can only hold a limited amount of values.
-
-For almost all types, you cannot specify where they should be stored, because
-they are copied every time they are used.
-
-The types where the so-called storage location is important are structs
-and arrays. If you e.g. pass such variables in function calls, their
-data is not copied if it can stay in memory or stay in storage.
-This means that you can modify their content in the called function
-and these modifications will still be visible in the caller.
-
-There are defaults for the storage location depending on which type
-of variable it concerns:
-
-* state variables are always in storage
-* function arguments are in memory by default
-* local variables of mapping type reference storage by default
-* local variables of value type (i.e. neither array, nor struct nor mapping) are stored in the stack
-
-For local variables of struct or array type the storage location has to be stated explicitly.
-
-Example::
-
- pragma solidity ^0.4.0;
-
- contract C {
- uint[] data1;
- uint[] data2;
-
- function appendOne() public {
- append(data1);
- }
-
- function appendTwo() public {
- append(data2);
- }
-
- function append(uint[] storage d) internal {
- d.push(1);
- }
- }
-
-The function ``append`` can work both on ``data1`` and ``data2`` and its modifications will be
-stored permanently. If you remove the ``storage`` keyword, the default
-is to use ``memory`` for function arguments. This has the effect that
-at the point where ``append(data1)`` or ``append(data2)`` is called, an
-independent copy of the state variable is created in memory and
-``append`` operates on this copy (which does not support ``.push`` - but that
-is another issue). The modifications to this independent copy do not
-carry back to ``data1`` or ``data2``.
-
-.. warning::
- Prior to version 0.5.0, a common mistake was to declare a local variable and assume that it will
- be created in memory, although it will be created in storage. Using such a variable without initializing
- could lead to unexpected behavior. Starting from 0.5.0, however, the storage location for local variables
- has to be specified explicitly and local storage variables have to be initialized, which should prevent
- these kinds of mistakes.
******************
Advanced Questions
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst
index e1b61d8b..f5769363 100644
--- a/docs/introduction-to-smart-contracts.rst
+++ b/docs/introduction-to-smart-contracts.rst
@@ -260,6 +260,10 @@ blocks that are added on top, the less likely it is. So it might be that your tr
are reverted and even removed from the blockchain, but the longer you wait, the less
likely it will be.
+.. note::
+ Transactions are not guaranteed to happen on the next block or any future specific block, since it is up to the miners to include transactions and not the submitter of the transaction. This applies to function calls and contract creation transactions alike.
+
+ If you want to schedule future calls of your contract, you can use the `alarm clock <http://www.ethereum-alarm-clock.com/>`_ service.
.. _the-ethereum-virtual-machine:
@@ -352,19 +356,21 @@ If the gas is used up at any point (i.e. it is negative),
an out-of-gas exception is triggered, which reverts all modifications
made to the state in the current call frame.
+Any unused gas is refunded at the end of the transaction.
+
.. index:: ! storage, ! memory, ! stack
Storage, Memory and the Stack
=============================
-Each account has a persistent memory area which is called **storage**.
+The Ethereum Virtual Machine has three areas where it can store data.
+
+Each account has a data area called **storage**, which is persistent between function calls.
Storage is a key-value store that maps 256-bit words to 256-bit words.
-It is not possible to enumerate storage from within a contract
-and it is comparatively costly to read and even more so, to modify
-storage. A contract can neither read nor write to any storage apart
-from its own.
+It is not possible to enumerate storage from within a contract and it is comparatively costly to read, and even more to modify storage.
+A contract can neither read nor write to any storage apart from its own.
-The second memory area is called **memory**, of which a contract obtains
+The second data area is called **memory**, of which a contract obtains
a freshly cleared instance for each message call. Memory is linear and can be
addressed at byte level, but reads are limited to a width of 256 bits, while writes
can be either 8 bits or 256 bits wide. Memory is expanded by a word (256-bit), when
@@ -373,7 +379,7 @@ within a word). At the time of expansion, the cost in gas must be paid. Memory i
costly the larger it grows (it scales quadratically).
The EVM is not a register machine but a stack machine, so all
-computations are performed on an area called the **stack**. It has a maximum size of
+computations are performed on an data area called the **stack**. It has a maximum size of
1024 elements and contains words of 256 bits. Access to the stack is
limited to the top end in the following way:
It is possible to copy one of
@@ -412,7 +418,7 @@ a top-level message call which in turn can create further message calls.
A contract can decide how much of its remaining **gas** should be sent
with the inner message call and how much it wants to retain.
If an out-of-gas exception happens in the inner call (or any
-other exception), this will be signalled by an error value put onto the stack.
+other exception), this will be signaled by an error value put onto the stack.
In this case, only the gas sent together with the call is used up.
In Solidity, the calling contract causes a manual exception by default in
such situations, so that exceptions "bubble up" the call stack.
@@ -470,21 +476,17 @@ these **create calls** and normal message calls is that the payload data is
executed and the result stored as code and the caller / creator
receives the address of the new contract on the stack.
-.. index:: selfdestruct
+.. index:: selfdestruct, self-destruct, deactivate
-Self-destruct
-=============
+Deactivate and Self-destruct
+============================
-The only possibility that code is removed from the blockchain is
-when a contract at that address performs the ``selfdestruct`` operation.
-The remaining Ether stored at that address is sent to a designated
-target and then the storage and code is removed from the state.
+The only way to remove code from the blockchain is when a contract at that address performs the ``selfdestruct`` operation. The remaining Ether stored at that address is sent to a designated target and then the storage and code is removed from the state. Removing the contract in theory sounds like a good idea, but it is potentially dangerous, as if someone sends Ether to removed contracts, the Ether is forever lost.
-.. warning:: Even if a contract's code does not contain a call to ``selfdestruct``,
- it can still perform that operation using ``delegatecall`` or ``callcode``.
+.. note::
+ Even if a contract's code does not contain a call to ``selfdestruct``, it can still perform that operation using ``delegatecall`` or ``callcode``.
-.. note:: The pruning of old contracts may or may not be implemented by Ethereum
- clients. Additionally, archive nodes could choose to keep the contract storage
- and code indefinitely.
+If you want to deactivate your contracts, you should instead **disable** them by changing some internal state which causes all functions to revert. This makes it impossible to use the contract, as it returns Ether immediately.
-.. note:: Currently **external accounts** cannot be removed from the state.
+.. warning::
+ Even if a contract is removed by "selfdestruct", it is still part of the history of the blockchain and probably retained by most Ethereum nodes. So using "selfdestruct" is not the same as deleting data from a hard disk.
diff --git a/docs/style-guide.rst b/docs/style-guide.rst
index 19e3aae5..53e126b4 100644
--- a/docs/style-guide.rst
+++ b/docs/style-guide.rst
@@ -229,7 +229,7 @@ Import statements should always be placed at the top of the file.
Yes::
- import "owned";
+ import "./Owned.sol";
contract A {
@@ -237,7 +237,7 @@ Yes::
}
- contract B is owned {
+ contract B is Owned {
...
}
@@ -248,10 +248,10 @@ No::
}
- import "owned";
+ import "./Owned.sol";
- contract B is owned {
+ contract B is Owned {
...
}
@@ -867,7 +867,65 @@ indistinguishable from the numerals one and zero.
Contract and Library Names
==========================
-Contracts and libraries should be named using the CapWords style. Examples: ``SimpleToken``, ``SmartBank``, ``CertificateHashRepository``, ``Player``.
+* Contracts and libraries should be named using the CapWords style. Examples: ``SimpleToken``, ``SmartBank``, ``CertificateHashRepository``, ``Player``, ``Congress``, ``Owned``.
+* Contract and library names should also match their filenames.
+* If a contract file includes multiple contracts and/or libraries, then the filename should match the *core contract*. This is not recommended however if it can be avoided.
+
+As shown in the example below, if the contract name is `Congress` and the library name is `Owned`, then their associated filenames should be `Congress.sol` and `Owned.sol`.
+
+Yes::
+
+ // Owned.sol
+ contract Owned {
+ address public owner;
+
+ constructor() public {
+ owner = msg.sender;
+ }
+
+ modifier onlyOwner {
+ require(msg.sender == owner);
+ _;
+ }
+
+ function transferOwnership(address newOwner) public onlyOwner {
+ owner = newOwner;
+ }
+ }
+
+ // Congress.sol
+ import "./Owned.sol";
+
+ contract Congress is Owned, TokenRecipient {
+ ...
+ }
+
+No::
+
+ // owned.sol
+ contract owned {
+ address public owner;
+
+ constructor() public {
+ owner = msg.sender;
+ }
+
+ modifier onlyOwner {
+ require(msg.sender == owner);
+ _;
+ }
+
+ function transferOwnership(address newOwner) public onlyOwner {
+ owner = newOwner;
+ }
+ }
+
+ // Congress.sol
+ import "./owned.sol";
+
+ contract Congress is owned, tokenRecipient {
+ ...
+ }
Struct Names
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index e058d917..ba793933 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -47,7 +47,6 @@ bool ReferencesResolver::visit(Block const& _block)
{
if (!m_resolveInsideCode)
return false;
- m_experimental050Mode = _block.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050);
m_resolver.setScope(&_block);
return true;
}
@@ -64,7 +63,6 @@ bool ReferencesResolver::visit(ForStatement const& _for)
{
if (!m_resolveInsideCode)
return false;
- m_experimental050Mode = _for.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050);
m_resolver.setScope(&_for);
return true;
}
diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h
index 4e8f54b5..24ec4643 100644
--- a/libsolidity/analysis/ReferencesResolver.h
+++ b/libsolidity/analysis/ReferencesResolver.h
@@ -94,7 +94,6 @@ private:
std::vector<ParameterList const*> m_returnParameters;
bool const m_resolveInsideCode;
bool m_errorOccurred = false;
- bool m_experimental050Mode = false;
};
}
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index a26828a6..a8ede66a 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -325,9 +325,6 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
std::vector<pair<string, Json::Value>> attributes = {
make_pair("name", _node.name()),
make_pair("documentation", _node.documentation() ? Json::Value(*_node.documentation()) : Json::nullValue),
- // FIXME: remove with next breaking release
- make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() <= StateMutability::View),
- make_pair("payable", _node.isPayable()),
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
make_pair("superFunction", idOrNull(_node.annotation().superFunction)),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
@@ -418,11 +415,8 @@ bool ASTJsonConverter::visit(UserDefinedTypeName const& _node)
bool ASTJsonConverter::visit(FunctionTypeName const& _node)
{
setJsonNode(_node, "FunctionTypeName", {
- make_pair("payable", _node.isPayable()),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("stateMutability", stateMutabilityToString(_node.stateMutability())),
- // FIXME: remove with next breaking release
- make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() <= StateMutability::View),
make_pair("parameterTypes", toJson(*_node.parameterTypeList())),
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true))
diff --git a/libsolidity/codegen/ABIFunctions.cpp b/libsolidity/codegen/ABIFunctions.cpp
index 1ce77d67..dda77958 100644
--- a/libsolidity/codegen/ABIFunctions.cpp
+++ b/libsolidity/codegen/ABIFunctions.cpp
@@ -228,7 +228,8 @@ string ABIFunctions::cleanupFunction(Type const& _type, bool _revertOnFailure)
if (type.numBytes() == 32)
templ("body", "cleaned := value");
else if (type.numBytes() == 0)
- templ("body", "cleaned := 0");
+ // This is disallowed in the type system.
+ solAssert(false, "");
else
{
size_t numBits = type.numBytes() * 8;
diff --git a/test/libsolidity/ASTJSON/documentation.json b/test/libsolidity/ASTJSON/documentation.json
index 56b748c1..403d4e72 100644
--- a/test/libsolidity/ASTJSON/documentation.json
+++ b/test/libsolidity/ASTJSON/documentation.json
@@ -148,7 +148,6 @@
"id" : 14,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "fn",
"nodeType" : "FunctionDefinition",
@@ -159,7 +158,6 @@
"parameters" : [],
"src" : "145:2:3"
},
- "payable" : false,
"returnParameters" :
{
"id" : 12,
diff --git a/test/libsolidity/ASTJSON/documentation_legacy.json b/test/libsolidity/ASTJSON/documentation_legacy.json
index 44ae537b..5a890e50 100644
--- a/test/libsolidity/ASTJSON/documentation_legacy.json
+++ b/test/libsolidity/ASTJSON/documentation_legacy.json
@@ -105,7 +105,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : "Some comment on fn.",
"implemented" : true,
"isConstructor" : false,
@@ -114,7 +113,6 @@
null
],
"name" : "fn",
- "payable" : false,
"scope" : 15,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/function_type.json b/test/libsolidity/ASTJSON/function_type.json
index f0389d17..7b10f0dc 100644
--- a/test/libsolidity/ASTJSON/function_type.json
+++ b/test/libsolidity/ASTJSON/function_type.json
@@ -38,7 +38,6 @@
"id" : 16,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -65,7 +64,6 @@
"typeName" :
{
"id" : 5,
- "isDeclaredConst" : false,
"nodeType" : "FunctionTypeName",
"parameterTypes" :
{
@@ -74,7 +72,6 @@
"parameters" : [],
"src" : "32:2:1"
},
- "payable" : true,
"returnParameterTypes" :
{
"id" : 4,
@@ -128,7 +125,6 @@
],
"src" : "23:46:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 14,
@@ -152,7 +148,6 @@
"typeName" :
{
"id" : 12,
- "isDeclaredConst" : true,
"nodeType" : "FunctionTypeName",
"parameterTypes" :
{
@@ -161,7 +156,6 @@
"parameters" : [],
"src" : "87:2:1"
},
- "payable" : false,
"returnParameterTypes" :
{
"id" : 11,
diff --git a/test/libsolidity/ASTJSON/function_type_legacy.json b/test/libsolidity/ASTJSON/function_type_legacy.json
index 4db5fb1c..952fd865 100644
--- a/test/libsolidity/ASTJSON/function_type_legacy.json
+++ b/test/libsolidity/ASTJSON/function_type_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 17,
"stateMutability" : "nonpayable",
"superFunction" : null,
@@ -75,8 +73,6 @@
{
"attributes" :
{
- "constant" : false,
- "payable" : true,
"stateMutability" : "payable",
"type" : "function () payable external returns (uint256)",
"visibility" : "external"
@@ -168,8 +164,6 @@
{
"attributes" :
{
- "constant" : true,
- "payable" : false,
"stateMutability" : "view",
"type" : "function () view external returns (uint256)",
"visibility" : "external"
diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json
index 6a956ca4..fe3e73d2 100644
--- a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json
+++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json
@@ -143,7 +143,6 @@
"id" : 10,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -154,7 +153,6 @@
"parameters" : [],
"src" : "23:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 2,
diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json
index cd4eefb1..d78d01ff 100644
--- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json
+++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 11,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier.json b/test/libsolidity/ASTJSON/long_type_name_identifier.json
index b1f8faa2..0579967c 100644
--- a/test/libsolidity/ASTJSON/long_type_name_identifier.json
+++ b/test/libsolidity/ASTJSON/long_type_name_identifier.json
@@ -149,7 +149,6 @@
"id" : 13,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -160,7 +159,6 @@
"parameters" : [],
"src" : "33:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 5,
diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json
index d7739f10..a96ccef3 100644
--- a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json
+++ b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json
@@ -80,7 +80,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -89,7 +88,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 14,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/modifier_definition.json b/test/libsolidity/ASTJSON/modifier_definition.json
index da64b78d..95554f03 100644
--- a/test/libsolidity/ASTJSON/modifier_definition.json
+++ b/test/libsolidity/ASTJSON/modifier_definition.json
@@ -98,7 +98,6 @@
"id" : 13,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" :
[
{
@@ -153,7 +152,6 @@
"parameters" : [],
"src" : "49:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 11,
diff --git a/test/libsolidity/ASTJSON/modifier_definition_legacy.json b/test/libsolidity/ASTJSON/modifier_definition_legacy.json
index f38d07be..e1e797ba 100644
--- a/test/libsolidity/ASTJSON/modifier_definition_legacy.json
+++ b/test/libsolidity/ASTJSON/modifier_definition_legacy.json
@@ -102,12 +102,10 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
"name" : "F",
- "payable" : false,
"scope" : 14,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/modifier_invocation.json b/test/libsolidity/ASTJSON/modifier_invocation.json
index da64b78d..95554f03 100644
--- a/test/libsolidity/ASTJSON/modifier_invocation.json
+++ b/test/libsolidity/ASTJSON/modifier_invocation.json
@@ -98,7 +98,6 @@
"id" : 13,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" :
[
{
@@ -153,7 +152,6 @@
"parameters" : [],
"src" : "49:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 11,
diff --git a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json
index f38d07be..e1e797ba 100644
--- a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json
+++ b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json
@@ -102,12 +102,10 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
"name" : "F",
- "payable" : false,
"scope" : 14,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/non_utf8.json b/test/libsolidity/ASTJSON/non_utf8.json
index ec4804f1..307259e9 100644
--- a/test/libsolidity/ASTJSON/non_utf8.json
+++ b/test/libsolidity/ASTJSON/non_utf8.json
@@ -90,7 +90,6 @@
"id" : 7,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -101,7 +100,6 @@
"parameters" : [],
"src" : "23:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 2,
diff --git a/test/libsolidity/ASTJSON/non_utf8_legacy.json b/test/libsolidity/ASTJSON/non_utf8_legacy.json
index d83d2d97..b1f847f7 100644
--- a/test/libsolidity/ASTJSON/non_utf8_legacy.json
+++ b/test/libsolidity/ASTJSON/non_utf8_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 8,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/short_type_name.json b/test/libsolidity/ASTJSON/short_type_name.json
index 32df8cde..502c1e31 100644
--- a/test/libsolidity/ASTJSON/short_type_name.json
+++ b/test/libsolidity/ASTJSON/short_type_name.json
@@ -94,7 +94,6 @@
"id" : 9,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -105,7 +104,6 @@
"parameters" : [],
"src" : "23:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 2,
diff --git a/test/libsolidity/ASTJSON/short_type_name_legacy.json b/test/libsolidity/ASTJSON/short_type_name_legacy.json
index d14954c8..761bcd3b 100644
--- a/test/libsolidity/ASTJSON/short_type_name_legacy.json
+++ b/test/libsolidity/ASTJSON/short_type_name_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 10,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/short_type_name_ref.json b/test/libsolidity/ASTJSON/short_type_name_ref.json
index ebe940cf..b0c3ad97 100644
--- a/test/libsolidity/ASTJSON/short_type_name_ref.json
+++ b/test/libsolidity/ASTJSON/short_type_name_ref.json
@@ -106,7 +106,6 @@
"id" : 10,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -117,7 +116,6 @@
"parameters" : [],
"src" : "23:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 2,
diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json
index aaf9b8be..d426a384 100644
--- a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json
+++ b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 11,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/ASTJSON/source_location.json b/test/libsolidity/ASTJSON/source_location.json
index bd9290fd..8d8acb0f 100644
--- a/test/libsolidity/ASTJSON/source_location.json
+++ b/test/libsolidity/ASTJSON/source_location.json
@@ -128,7 +128,6 @@
"id" : 10,
"implemented" : true,
"isConstructor" : false,
- "isDeclaredConst" : false,
"modifiers" : [],
"name" : "f",
"nodeType" : "FunctionDefinition",
@@ -139,7 +138,6 @@
"parameters" : [],
"src" : "23:2:1"
},
- "payable" : false,
"returnParameters" :
{
"id" : 2,
diff --git a/test/libsolidity/ASTJSON/source_location_legacy.json b/test/libsolidity/ASTJSON/source_location_legacy.json
index d046e6ae..327cd6da 100644
--- a/test/libsolidity/ASTJSON/source_location_legacy.json
+++ b/test/libsolidity/ASTJSON/source_location_legacy.json
@@ -38,7 +38,6 @@
{
"attributes" :
{
- "constant" : false,
"documentation" : null,
"implemented" : true,
"isConstructor" : false,
@@ -47,7 +46,6 @@
null
],
"name" : "f",
- "payable" : false,
"scope" : 11,
"stateMutability" : "nonpayable",
"superFunction" : null,
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 066e97e6..9c287e5e 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -12489,6 +12489,44 @@ BOOST_AUTO_TEST_CASE(abi_encode_with_signaturev2)
ABI_CHECK(callContractFunction("f4()"), expectation);
}
+BOOST_AUTO_TEST_CASE(abi_encode_empty_string)
+{
+ char const* sourceCode = R"(
+ // Tests that this will not end up using a "bytes0" type
+ // (which would assert)
+ contract C {
+ function f() public pure returns (bytes memory, bytes memory) {
+ return (abi.encode(""), abi.encodePacked(""));
+ }
+ }
+ )";
+ compileAndRun(sourceCode, 0, "C");
+ ABI_CHECK(callContractFunction("f()"), encodeArgs(
+ 0x40, 0xc0,
+ 0x60, 0x20, 0x00, 0x00,
+ 0x00
+ ));
+}
+
+BOOST_AUTO_TEST_CASE(abi_encode_empty_string_v2)
+{
+ char const* sourceCode = R"(
+ // Tests that this will not end up using a "bytes0" type
+ // (which would assert)
+ pragma experimental ABIEncoderV2;
+ contract C {
+ function f() public pure returns (bytes memory, bytes memory) {
+ return (abi.encode(""), abi.encodePacked(""));
+ }
+ }
+ )";
+ compileAndRun(sourceCode, 0, "C");
+ ABI_CHECK(callContractFunction("f()"), encodeArgs(
+ 0x40, 0xa0,
+ 0x40, 0x20, 0x00,
+ 0x00
+ ));
+}
BOOST_AUTO_TEST_CASE(abi_encode_call)
{
char const* sourceCode = R"T(
diff --git a/test/libsolidity/syntaxTests/constants/assign_constant_function_value_050.sol b/test/libsolidity/syntaxTests/constants/assign_constant_function_value_050.sol
deleted file mode 100644
index 2c92899d..00000000
--- a/test/libsolidity/syntaxTests/constants/assign_constant_function_value_050.sol
+++ /dev/null
@@ -1,8 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract C {
- function () pure returns (uint) x;
- uint constant y = x();
-}
-// ----
-// TypeError: (105-108): Initial value for constant variable has to be compile-time constant.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol
deleted file mode 100644
index 8d5df5bf..00000000
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/ancestor_V050.sol
+++ /dev/null
@@ -1,7 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract A { constructor(uint) public { } }
-contract B is A(2) { constructor() public { } }
-contract C is B { constructor() A(3) public { } }
-// ----
-// DeclarationError: (156-160): Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol b/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol
deleted file mode 100644
index f9325f99..00000000
--- a/test/libsolidity/syntaxTests/inheritance/duplicated_constructor_call/base_V050.sol
+++ /dev/null
@@ -1,6 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract A { constructor(uint) public { } }
-contract B is A(2) { constructor() A(3) public { } }
-// ----
-// DeclarationError: (110-114): Base constructor arguments given twice.
diff --git a/test/libsolidity/syntaxTests/modifiers/modifiers_on_abstract_functions_050.sol b/test/libsolidity/syntaxTests/modifiers/modifiers_on_abstract_functions_050.sol
deleted file mode 100644
index af1babbc..00000000
--- a/test/libsolidity/syntaxTests/modifiers/modifiers_on_abstract_functions_050.sol
+++ /dev/null
@@ -1,10 +0,0 @@
-pragma experimental "v0.5.0";
-contract C
-{
- modifier only_owner() { _; }
- function foo() only_owner public;
- function bar() public only_owner;
-}
-// ----
-// SyntaxError: (80-113): Functions without implementation cannot have modifiers.
-// SyntaxError: (118-151): Functions without implementation cannot have modifiers.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol
deleted file mode 100644
index dc0a6e63..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol
+++ /dev/null
@@ -1,7 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract C {
- address constant x = msg.sender;
-}
-// ----
-// TypeError: (69-79): Initial value for constant variable has to be compile-time constant.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol
deleted file mode 100644
index c0e29b38..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol
+++ /dev/null
@@ -1,8 +0,0 @@
-pragma experimental "v0.5.0";
-contract test {
- function f() pure public {
- address(0x12).callcode;
- }
-}
-// ----
-// TypeError: (85-107): "callcode" has been deprecated in favour of "delegatecall".
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
index 4cda64e7..ca1e15a9 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract c {
uint8 x;
function f() public {
@@ -6,4 +5,4 @@ contract c {
}
}
// ----
-// TypeError: (105-106): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (75-76): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
index d6dcc4d0..0032f99e 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
modifier m {
uint a = 1;
@@ -11,4 +10,4 @@ contract test {
}
}
// ----
-// Warning: (152-181): Function state mutability can be restricted to pure
+// Warning: (122-151): Function state mutability can be restricted to pure
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
index 9a2065e2..3dfb458a 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (119-120): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (89-90): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
index b99179ef..b9b92d47 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint x = 1;
modifier m {
@@ -11,4 +10,4 @@ contract test {
}
}
// ----
-// TypeError: (110-111): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (80-81): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
index 866232dd..c8928804 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint constant x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (128-129): Constant variables not supported by inline assembly.
+// TypeError: (98-99): Constant variables not supported by inline assembly.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
index a41858a0..03ff9166 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint constant x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (137-138): Constant variables not supported by inline assembly.
+// TypeError: (107-108): Constant variables not supported by inline assembly.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
index 93004ef6..877f5783 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
function f() public {
uint a;
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// DeclarationError: (144-145): Cannot access local Solidity variables from inside an inline assembly function.
+// DeclarationError: (114-115): Cannot access local Solidity variables from inside an inline assembly function.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
index 913ea725..65d614a3 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint[] r;
function f() public {
@@ -9,4 +8,4 @@ contract test {
}
}
// ----
-// DeclarationError: (172-180): Cannot access local Solidity variables from inside an inline assembly function.
+// DeclarationError: (142-150): Cannot access local Solidity variables from inside an inline assembly function.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
index 7528f355..abe9067a 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint a;
function f() pure public {
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
index d95fd978..9e324ce1 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract C {
function f(bytes bytesAsCalldata) external {
assembly {
@@ -7,4 +6,4 @@ contract C {
}
}
// ----
-// TypeError: (132-147): Call data elements cannot be accessed directly. Copy to a local variable first or use "calldataload" or "calldatacopy" with manually determined offsets and sizes.
+// TypeError: (102-117): Call data elements cannot be accessed directly. Copy to a local variable first or use "calldataload" or "calldatacopy" with manually determined offsets and sizes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol
deleted file mode 100644
index 0c98ada1..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol
+++ /dev/null
@@ -1,10 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- function f() pure public {
- assembly {
- jump(2)
- }
- }
-}
-// ----
-// SyntaxError: (105-112): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol
deleted file mode 100644
index f72fe741..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol
+++ /dev/null
@@ -1,11 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- function f() pure public {
- assembly {
- mload(0)
- }
- }
-}
-// ----
-// SyntaxError: (105-113): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
-// DeclarationError: (91-123): Unbalanced stack at the end of a block: 1 surplus item(s).
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol
deleted file mode 100644
index e148d65a..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol
+++ /dev/null
@@ -1,9 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- event e();
- function f() public {
- e();
- }
-}
-// ----
-// TypeError: (92-95): Event invocations have to be prefixed by "emit".
diff --git a/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol b/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol
index ae722391..32b381bb 100644
--- a/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol
+++ b/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract C {
function f() public pure returns (uint, uint, bytes32) {
uint a;
@@ -8,5 +7,5 @@ contract C {
}
}
// ----
-// TypeError: (133-136): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(uint256,).
-// TypeError: (147-150): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(,bytes32).
+// TypeError: (103-106): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(uint256,).
+// TypeError: (117-120): Type tuple(uint256,uint256,bytes32) is not implicitly convertible to expected type tuple(,bytes32).
diff --git a/test/libsolidity/syntaxTests/tupleAssignments/large_component_count.sol b/test/libsolidity/syntaxTests/tupleAssignments/large_component_count.sol
index bbf21d7e..f14641cb 100644
--- a/test/libsolidity/syntaxTests/tupleAssignments/large_component_count.sol
+++ b/test/libsolidity/syntaxTests/tupleAssignments/large_component_count.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract C {
function g() public pure returns (
uint,
diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_external050.sol b/test/libsolidity/syntaxTests/visibility/interface/function_external.sol
index 3f0a9aca..ed409e58 100644
--- a/test/libsolidity/syntaxTests/visibility/interface/function_external050.sol
+++ b/test/libsolidity/syntaxTests/visibility/interface/function_external.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
interface I {
function f() external;
}
diff --git a/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol b/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol
deleted file mode 100644
index e0c04095..00000000
--- a/test/libsolidity/syntaxTests/visibility/interface/function_public050.sol
+++ /dev/null
@@ -1,6 +0,0 @@
-pragma experimental "v0.5.0";
-interface I {
- function f() public;
-}
-// ----
-// TypeError: (45-65): Functions in interfaces must be declared external.