diff --git a/test/cmdlineTests/ir_compiler_inheritance_nosubobjects/input.sol b/test/cmdlineTests/ir_compiler_inheritance_nosubobjects/input.sol index 160c4cd1d..8d523bd4d 100644 --- a/test/cmdlineTests/ir_compiler_inheritance_nosubobjects/input.sol +++ b/test/cmdlineTests/ir_compiler_inheritance_nosubobjects/input.sol @@ -2,7 +2,7 @@ pragma solidity >=0.6.0; contract C { - constructor() public {} + constructor() {} } contract D is C { } \ No newline at end of file diff --git a/test/cmdlineTests/message_format_utf8/err b/test/cmdlineTests/message_format_utf8/err index fcd1717b8..c73ed714f 100644 --- a/test/cmdlineTests/message_format_utf8/err +++ b/test/cmdlineTests/message_format_utf8/err @@ -5,10 +5,10 @@ Warning: Source file does not specify required compiler version! --> message_format_utf8/input.sol Warning: Statement has no effect. - --> message_format_utf8/input.sol:2:58: + --> message_format_utf8/input.sol:2:51: | -2 | /* ©©©©ᄅ©©©©© 2017 */ constructor () public { "©©©©ᄅ©©©©©" ; } - | ^^^^^^^^^^^^ +2 | /* ©©©©ᄅ©©©©© 2017 */ constructor () { "©©©©ᄅ©©©©©" ; } + | ^^^^^^^^^^^^ Warning: Statement has no effect. --> message_format_utf8/input.sol:6:25: diff --git a/test/cmdlineTests/message_format_utf8/input.sol b/test/cmdlineTests/message_format_utf8/input.sol index 51585efde..dbeddfa01 100644 --- a/test/cmdlineTests/message_format_utf8/input.sol +++ b/test/cmdlineTests/message_format_utf8/input.sol @@ -1,5 +1,5 @@ contract Foo { -/* ©©©©ᄅ©©©©© 2017 */ constructor () public { "©©©©ᄅ©©©©©" ; } +/* ©©©©ᄅ©©©©© 2017 */ constructor () { "©©©©ᄅ©©©©©" ; } function f() public pure { diff --git a/test/cmdlineTests/optimizer_user_yul/input.sol b/test/cmdlineTests/optimizer_user_yul/input.sol index e61b132e4..f43ccc755 100644 --- a/test/cmdlineTests/optimizer_user_yul/input.sol +++ b/test/cmdlineTests/optimizer_user_yul/input.sol @@ -3,7 +3,7 @@ pragma solidity >=0.0; contract C { - constructor() public payable + constructor() payable { int a; diff --git a/test/cmdlineTests/optimizer_user_yul/output b/test/cmdlineTests/optimizer_user_yul/output index 340d70914..34f35c643 100644 --- a/test/cmdlineTests/optimizer_user_yul/output +++ b/test/cmdlineTests/optimizer_user_yul/output @@ -1,69 +1,69 @@ ======= optimizer_user_yul/input.sol:C ======= EVM assembly: - /* "optimizer_user_yul/input.sol":60:525 contract C... */ + /* "optimizer_user_yul/input.sol":60:518 contract C... */ mstore(0x40, 0x80) - /* "optimizer_user_yul/input.sol":108:113 int a */ + /* "optimizer_user_yul/input.sol":101:106 int a */ 0x00 - /* "optimizer_user_yul/input.sol":188:197 let x,y,z */ + /* "optimizer_user_yul/input.sol":181:190 let x,y,z */ dup1 0x00 dup1 - /* "optimizer_user_yul/input.sol":212:213 1 */ + /* "optimizer_user_yul/input.sol":205:206 1 */ 0x01 - /* "optimizer_user_yul/input.sol":209:210 0 */ + /* "optimizer_user_yul/input.sol":202:203 0 */ 0x00 - /* "optimizer_user_yul/input.sol":202:214 sstore(0, 1) */ + /* "optimizer_user_yul/input.sol":195:207 sstore(0, 1) */ sstore - /* "optimizer_user_yul/input.sol":219:265 for { } sload(4) { } {... */ + /* "optimizer_user_yul/input.sol":212:258 for { } sload(4) { } {... */ tag_3: - /* "optimizer_user_yul/input.sol":233:234 4 */ + /* "optimizer_user_yul/input.sol":226:227 4 */ 0x04 - /* "optimizer_user_yul/input.sol":227:235 sload(4) */ + /* "optimizer_user_yul/input.sol":220:228 sload(4) */ sload - /* "optimizer_user_yul/input.sol":219:265 for { } sload(4) { } {... */ + /* "optimizer_user_yul/input.sol":212:258 for { } sload(4) { } {... */ iszero tag_5 jumpi pop - /* "optimizer_user_yul/input.sol":251:260 exp(x, y) */ + /* "optimizer_user_yul/input.sol":244:253 exp(x, y) */ dup1 dup3 exp - /* "optimizer_user_yul/input.sol":219:265 for { } sload(4) { } {... */ + /* "optimizer_user_yul/input.sol":212:258 for { } sload(4) { } {... */ jump(tag_3) tag_5: - /* "optimizer_user_yul/input.sol":223:226 { } */ + /* "optimizer_user_yul/input.sol":216:219 { } */ pop pop pop - /* "optimizer_user_yul/input.sol":275:276 2 */ + /* "optimizer_user_yul/input.sol":268:269 2 */ 0x02 - /* "optimizer_user_yul/input.sol":270:276 a := 2 */ + /* "optimizer_user_yul/input.sol":263:269 a := 2 */ swap1 pop - /* "optimizer_user_yul/input.sol":376:377 3 */ + /* "optimizer_user_yul/input.sol":369:370 3 */ 0x03 - /* "optimizer_user_yul/input.sol":373:374 2 */ + /* "optimizer_user_yul/input.sol":366:367 2 */ 0x02 - /* "optimizer_user_yul/input.sol":366:378 sstore(2, 3) */ + /* "optimizer_user_yul/input.sol":359:371 sstore(2, 3) */ sstore - /* "optimizer_user_yul/input.sol":383:516 for { } sload(5) { } {... */ + /* "optimizer_user_yul/input.sol":376:509 for { } sload(5) { } {... */ tag_6: - /* "optimizer_user_yul/input.sol":397:398 5 */ + /* "optimizer_user_yul/input.sol":390:391 5 */ 0x05 - /* "optimizer_user_yul/input.sol":391:399 sload(5) */ + /* "optimizer_user_yul/input.sol":384:392 sload(5) */ sload tag_9 jumpi jump(tag_8) tag_9: - /* "optimizer_user_yul/input.sol":383:516 for { } sload(5) { } {... */ + /* "optimizer_user_yul/input.sol":376:509 for { } sload(5) { } {... */ jump(tag_6) tag_8: - /* "optimizer_user_yul/input.sol":347:520 {... */ + /* "optimizer_user_yul/input.sol":340:513 {... */ pop - /* "optimizer_user_yul/input.sol":60:525 contract C... */ + /* "optimizer_user_yul/input.sol":60:518 contract C... */ dataSize(sub_0) dup1 dataOffset(sub_0) @@ -74,7 +74,7 @@ tag_8: stop sub_0: assembly { - /* "optimizer_user_yul/input.sol":60:525 contract C... */ + /* "optimizer_user_yul/input.sol":60:518 contract C... */ mstore(0x40, 0x80) 0x00 dup1 diff --git a/test/cmdlineTests/recovery_ast_constructor/input.sol b/test/cmdlineTests/recovery_ast_constructor/input.sol index 9035590d9..8da09638a 100644 --- a/test/cmdlineTests/recovery_ast_constructor/input.sol +++ b/test/cmdlineTests/recovery_ast_constructor/input.sol @@ -2,7 +2,7 @@ pragma solidity >=0.0.0; contract Error1 { - constructor() public { + constructor() { balances[tx.origin] = ; // missing RHS. } diff --git a/test/cmdlineTests/recovery_ast_constructor/output b/test/cmdlineTests/recovery_ast_constructor/output index 27a7b5ce5..d4a7d0288 100644 --- a/test/cmdlineTests/recovery_ast_constructor/output +++ b/test/cmdlineTests/recovery_ast_constructor/output @@ -97,7 +97,7 @@ JSON AST: "children": [], "id": 3, "name": "ParameterList", - "src": "103:0:0" + "src": "96:0:0" }, { "attributes": @@ -110,12 +110,12 @@ JSON AST: "children": [], "id": 8, "name": "Block", - "src": "103:49:0" + "src": "96:49:0" } ], "id": 9, "name": "FunctionDefinition", - "src": "82:70:0" + "src": "82:63:0" }, { "attributes": @@ -147,7 +147,7 @@ JSON AST: "children": [], "id": 10, "name": "ParameterList", - "src": "418:2:0" + "src": "411:2:0" }, { "children": @@ -174,17 +174,17 @@ JSON AST: }, "id": 11, "name": "ElementaryTypeName", - "src": "441:4:0" + "src": "434:4:0" } ], "id": 12, "name": "VariableDeclaration", - "src": "441:4:0" + "src": "434:4:0" } ], "id": 13, "name": "ParameterList", - "src": "440:6:0" + "src": "433:6:0" }, { "children": @@ -210,30 +210,30 @@ JSON AST: }, "id": 14, "name": "Literal", - "src": "460:1:0" + "src": "453:1:0" } ], "id": 15, "name": "Return", - "src": "453:8:0" + "src": "446:8:0" } ], "id": 16, "name": "Block", - "src": "447:19:0" + "src": "440:19:0" } ], "id": 17, "name": "FunctionDefinition", - "src": "405:61:0" + "src": "398:61:0" } ], "id": 18, "name": "ContractDefinition", - "src": "62:406:0" + "src": "62:399:0" } ], "id": 19, "name": "SourceUnit", - "src": "36:433:0" + "src": "36:426:0" } diff --git a/test/cmdlineTests/standard_secondary_source_location/input.json b/test/cmdlineTests/standard_secondary_source_location/input.json index 0cd6a6126..e429265b4 100644 --- a/test/cmdlineTests/standard_secondary_source_location/input.json +++ b/test/cmdlineTests/standard_secondary_source_location/input.json @@ -4,7 +4,7 @@ { "A": { - "content": "//SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}" + "content": "//SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; contract A { constructor(uint) {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}" } } } diff --git a/test/cmdlineTests/standard_secondary_source_location/output.json b/test/cmdlineTests/standard_secondary_source_location/output.json index b32b00028..45874df27 100644 --- a/test/cmdlineTests/standard_secondary_source_location/output.json +++ b/test/cmdlineTests/standard_secondary_source_location/output.json @@ -1,10 +1,10 @@ -{"errors":[{"component":"general","errorCode":"3364","formattedMessage":"A:2:112: DeclarationError: Base constructor arguments given twice. -pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} - ^-------------------^ -A:2:81: First constructor call is here: -pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} - ^--^ -A:2:104: Second constructor call is here: -pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} - ^--^ -","message":"Base constructor arguments given twice.","secondarySourceLocations":[{"end":119,"file":"A","message":"First constructor call is here:","start":115},{"end":142,"file":"A","message":"Second constructor call is here:","start":138}],"severity":"error","sourceLocation":{"end":167,"file":"A","start":146},"type":"DeclarationError"}],"sources":{}} +{"errors":[{"component":"general","errorCode":"3364","formattedMessage":"A:2:105: DeclarationError: Base constructor arguments given twice. +pragma solidity >=0.0; contract A { constructor(uint) {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} + ^-------------------^ +A:2:74: First constructor call is here: +pragma solidity >=0.0; contract A { constructor(uint) {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} + ^--^ +A:2:97: Second constructor call is here: +pragma solidity >=0.0; contract A { constructor(uint) {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {} + ^--^ +","message":"Base constructor arguments given twice.","secondarySourceLocations":[{"end":112,"file":"A","message":"First constructor call is here:","start":108},{"end":135,"file":"A","message":"Second constructor call is here:","start":131}],"severity":"error","sourceLocation":{"end":160,"file":"A","start":139},"type":"DeclarationError"}],"sources":{}} diff --git a/test/cmdlineTests/yul_optimizer_steps/input.sol b/test/cmdlineTests/yul_optimizer_steps/input.sol index a75662b25..c93363e41 100644 --- a/test/cmdlineTests/yul_optimizer_steps/input.sol +++ b/test/cmdlineTests/yul_optimizer_steps/input.sol @@ -3,5 +3,5 @@ pragma solidity >=0.0; contract C { - constructor() public {} + constructor() {} } diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol index cbb4355e8..b4594344c 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol @@ -104,7 +104,6 @@ contract MultiSigWallet { /// @param _owners List of initial owners. /// @param _required Number of required confirmations. constructor(address[] memory _owners, uint _required) - public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { diff --git a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol index bb85c46d0..6207f9764 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol @@ -20,7 +20,6 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet { /// @param _required Number of required confirmations. /// @param _dailyLimit Amount in wei, which can be withdrawn without confirmations on a daily basis. constructor(address[] memory _owners, uint _required, uint _dailyLimit) - public MultiSigWallet(_owners, _required) { dailyLimit = _dailyLimit; diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol index a8804fd4c..a0c31cbc3 100644 --- a/test/compilationTests/corion/ico.sol +++ b/test/compilationTests/corion/ico.sol @@ -50,7 +50,7 @@ contract ico is safeMath { uint256 public totalMint; uint256 public totalPremiumMint; - constructor(address payable foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] memory genesisAddr, uint256[] memory genesisValue) public { + constructor(address payable foundation, address priceSet, uint256 exchangeRate, uint256 startBlockNum, address[] memory genesisAddr, uint256[] memory genesisValue) { /* Installation function. diff --git a/test/compilationTests/corion/moduleHandler.sol b/test/compilationTests/corion/moduleHandler.sol index ccbe5ac92..e8e65760c 100644 --- a/test/compilationTests/corion/moduleHandler.sol +++ b/test/compilationTests/corion/moduleHandler.sol @@ -36,7 +36,7 @@ contract moduleHandler is multiOwner, announcementTypes { uint256 debugModeUntil = block.number + 1000000; - constructor(address[] memory newOwners) multiOwner(newOwners) public {} + constructor(address[] memory newOwners) multiOwner(newOwners) {} function load(address payable foundation, bool forReplace, address payable Token, address payable Premium, address payable Publisher, address payable Schelling, address payable Provider) public { /* Loading modulest to ModuleHandler. diff --git a/test/compilationTests/corion/multiOwner.sol b/test/compilationTests/corion/multiOwner.sol index b61289dd2..cad0ce7a8 100644 --- a/test/compilationTests/corion/multiOwner.sol +++ b/test/compilationTests/corion/multiOwner.sol @@ -12,7 +12,7 @@ contract multiOwner is safeMath { /* Constructor */ - constructor(address[] memory newOwners) public { + constructor(address[] memory newOwners) { for ( uint256 a=0 ; a bool) public genesis; - constructor(bool forReplace, address payable moduleHandler, address dbAddress, address icoContractAddr, address[] memory genesisAddr, uint256[] memory genesisValue) public { + constructor(bool forReplace, address payable moduleHandler, address dbAddress, address icoContractAddr, address[] memory genesisAddr, uint256[] memory genesisValue) { /* Setup function. If an ICOaddress is defined then the balance of the genesis addresses will be set as well. diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol index 8b8761179..1e2d308a1 100644 --- a/test/compilationTests/corion/provider.sol +++ b/test/compilationTests/corion/provider.sol @@ -118,7 +118,7 @@ contract provider is module, safeMath, announcementTypes { uint256 private currentSchellingRound = 1; - constructor(address payable _moduleHandler) public { + constructor(address payable _moduleHandler) { /* Install function. diff --git a/test/compilationTests/corion/publisher.sol b/test/compilationTests/corion/publisher.sol index 19746ec57..ec8ce33bc 100644 --- a/test/compilationTests/corion/publisher.sol +++ b/test/compilationTests/corion/publisher.sol @@ -61,7 +61,7 @@ contract publisher is announcementTypes, module, safeMath { mapping (address => uint256[]) public opponents; - constructor(address payable moduleHandler) public { + constructor(address payable moduleHandler) { /* Installation function. The installer will be registered in the admin list automatically diff --git a/test/compilationTests/corion/schelling.sol b/test/compilationTests/corion/schelling.sol index 51f4727ef..bbb16e250 100644 --- a/test/compilationTests/corion/schelling.sol +++ b/test/compilationTests/corion/schelling.sol @@ -45,7 +45,7 @@ contract schellingDB is safeMath, schellingVars { /* Constructor */ - constructor() public { + constructor() { rounds.push(); rounds.push(); rounds[0].blockHeight = block.number; @@ -249,7 +249,7 @@ contract schelling is module, announcementTypes, schellingVars { bytes1 public belowChar = 0x30; schellingDB private db; - constructor(address payable _moduleHandler, address _db, bool _forReplace) public { + constructor(address payable _moduleHandler, address _db, bool _forReplace) { /* Installation function. diff --git a/test/compilationTests/corion/token.sol b/test/compilationTests/corion/token.sol index 0888744db..865372d5f 100644 --- a/test/compilationTests/corion/token.sol +++ b/test/compilationTests/corion/token.sol @@ -49,7 +49,7 @@ contract token is safeMath, module, announcementTypes { mapping(address => bool) public genesis; - constructor(bool forReplace, address payable moduleHandler, address dbAddr, address payable icoContractAddr, address payable exchangeContractAddress, address payable[] memory genesisAddr, uint256[] memory genesisValue) public payable { + constructor(bool forReplace, address payable moduleHandler, address dbAddr, address payable icoContractAddr, address payable exchangeContractAddress, address payable[] memory genesisAddr, uint256[] memory genesisValue) payable { /* Installation function diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol index 6b04b73d9..e3cd0edc7 100644 --- a/test/compilationTests/gnosis/Events/CategoricalEvent.sol +++ b/test/compilationTests/gnosis/Events/CategoricalEvent.sol @@ -18,7 +18,6 @@ contract CategoricalEvent is Event { Oracle _oracle, uint8 outcomeCount ) - public Event(_collateralToken, _oracle, outcomeCount) { diff --git a/test/compilationTests/gnosis/Events/Event.sol b/test/compilationTests/gnosis/Events/Event.sol index 8f48d4ac2..4b5bb24d0 100644 --- a/test/compilationTests/gnosis/Events/Event.sol +++ b/test/compilationTests/gnosis/Events/Event.sol @@ -34,7 +34,6 @@ abstract contract Event { /// @param _oracle Oracle contract used to resolve the event /// @param outcomeCount Number of event outcomes constructor(Token _collateralToken, Oracle _oracle, uint8 outcomeCount) - public { // Validate input require(address(_collateralToken) != address(0) && address(_oracle) != address(0) && outcomeCount >= 2); diff --git a/test/compilationTests/gnosis/Events/ScalarEvent.sol b/test/compilationTests/gnosis/Events/ScalarEvent.sol index 6df1dc072..c2b0a90a2 100644 --- a/test/compilationTests/gnosis/Events/ScalarEvent.sol +++ b/test/compilationTests/gnosis/Events/ScalarEvent.sol @@ -34,7 +34,6 @@ contract ScalarEvent is Event { int _lowerBound, int _upperBound ) - public Event(_collateralToken, _oracle, 2) { // Validate bounds diff --git a/test/compilationTests/gnosis/Markets/Campaign.sol b/test/compilationTests/gnosis/Markets/Campaign.sol index a4aa97134..450a38170 100644 --- a/test/compilationTests/gnosis/Markets/Campaign.sol +++ b/test/compilationTests/gnosis/Markets/Campaign.sol @@ -78,7 +78,6 @@ contract Campaign { uint _funding, uint _deadline ) - public { // Validate input require( address(_eventContract) != address(0) diff --git a/test/compilationTests/gnosis/Markets/StandardMarket.sol b/test/compilationTests/gnosis/Markets/StandardMarket.sol index d77fadaca..5e476a86f 100644 --- a/test/compilationTests/gnosis/Markets/StandardMarket.sol +++ b/test/compilationTests/gnosis/Markets/StandardMarket.sol @@ -39,7 +39,6 @@ contract StandardMarket is Market { /// @param _marketMaker Market maker contract /// @param _fee Market fee constructor(address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee) - public { // Validate inputs require(address(_eventContract) != address(0) && address(_marketMaker) != address(0) && _fee < FEE_RANGE); diff --git a/test/compilationTests/gnosis/Migrations.sol b/test/compilationTests/gnosis/Migrations.sol index 396e36494..9d37ef688 100644 --- a/test/compilationTests/gnosis/Migrations.sol +++ b/test/compilationTests/gnosis/Migrations.sol @@ -8,7 +8,7 @@ contract Migrations { if (msg.sender == owner) _; } - constructor() public { + constructor() { owner = msg.sender; } diff --git a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol index 97253229c..08df08305 100644 --- a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol +++ b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol @@ -35,7 +35,6 @@ contract CentralizedOracle is Oracle { /// @dev Constructor sets owner address and IPFS hash /// @param _ipfsHash Hash identifying off chain event description constructor(address _owner, bytes memory _ipfsHash) - public { // Description hash cannot be null require(_ipfsHash.length == 46); diff --git a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol index a42f2ba66..b94f5b64b 100644 --- a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol +++ b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol @@ -23,7 +23,6 @@ contract DifficultyOracle is Oracle { /// @dev Contract constructor validates and sets target block number /// @param _blockNumber Target block number constructor(uint _blockNumber) - public { // Block has to be in the future require(_blockNumber > block.number); diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol index 1f92bcd9c..89b418b73 100644 --- a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol +++ b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol @@ -68,7 +68,6 @@ contract FutarchyOracle is Oracle { uint24 fee, uint _deadline ) - public { // Deadline is in the future require(_deadline > block.timestamp); diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol index 4a440c58c..a6438379b 100644 --- a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol +++ b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol @@ -34,7 +34,6 @@ contract FutarchyOracleFactory { /// @dev Constructor sets event factory contract /// @param _eventFactory Event factory contract constructor(EventFactory _eventFactory) - public { require(address(_eventFactory) != address(0)); eventFactory = _eventFactory; diff --git a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol index d57c89429..854088fa4 100644 --- a/test/compilationTests/gnosis/Oracles/MajorityOracle.sol +++ b/test/compilationTests/gnosis/Oracles/MajorityOracle.sol @@ -17,7 +17,6 @@ contract MajorityOracle is Oracle { /// @dev Allows to create an oracle for a majority vote based on other oracles /// @param _oracles List of oracles taking part in the majority vote constructor(Oracle[] memory _oracles) - public { // At least 2 oracles should be defined require(_oracles.length > 2); diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol index 694b73742..7b56a107e 100644 --- a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol +++ b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol @@ -39,7 +39,6 @@ contract SignedMessageOracle is Oracle { /// @param r Signature parameter /// @param s Signature parameter constructor(bytes32 _descriptionHash, uint8 v, bytes32 r, bytes32 s) - public { signer = ecrecover(_descriptionHash, v, r, s); descriptionHash = _descriptionHash; diff --git a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol index 9b8b98290..9fc7a0cc9 100644 --- a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol +++ b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol @@ -54,7 +54,6 @@ contract UltimateOracle is Oracle { uint _challengeAmount, uint _frontRunnerPeriod ) - public { // Validate inputs require( address(_forwardedOracle) != address(0) diff --git a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol index 11f4ece14..ed63541db 100644 --- a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol +++ b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol @@ -32,7 +32,6 @@ contract OutcomeToken is StandardToken { */ /// @dev Constructor sets events contract address constructor() - public { eventContract = msg.sender; } diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index 70ded719f..2aee9f4cf 100644 --- a/test/compilationTests/milestonetracker/MilestoneTracker.sol +++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol @@ -112,7 +112,7 @@ contract MilestoneTracker { address _arbitrator, address _donor, address _recipient - ) public { + ) { arbitrator = _arbitrator; donor = _donor; recipient = _recipient; diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp index 29c734f20..9a76aae7a 100644 --- a/test/contracts/AuctionRegistrar.cpp +++ b/test/contracts/AuctionRegistrar.cpp @@ -114,7 +114,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem { uint constant c_renewalInterval = 365 days; uint constant c_freeBytes = 12; - constructor() public { + constructor() { // TODO: Populate with hall-of-fame. } diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp index 5f353b0bc..764cae0ae 100644 --- a/test/contracts/Wallet.cpp +++ b/test/contracts/Wallet.cpp @@ -100,7 +100,7 @@ contract multiowned { // constructor is given number of sigs required to do protected "onlymanyowners" transactions // as well as the selection of addresses capable of confirming them. - constructor(address[] memory _owners, uint _required) public { + constructor(address[] memory _owners, uint _required) { m_numOwners = _owners.length + 1; m_owners[1] = uint(msg.sender); m_ownerIndex[uint(msg.sender)] = 1; @@ -288,7 +288,7 @@ abstract contract daylimit is multiowned { // METHODS // constructor - stores initial daily limit and records the present day's index. - constructor(uint _limit) public { + constructor(uint _limit) { m_dailyLimit = _limit; m_lastDay = today(); } @@ -369,7 +369,7 @@ contract Wallet is multisig, multiowned, daylimit { // constructor - just pass on the owner array to the multiowned and // the limit to daylimit - constructor(address[] memory _owners, uint _required, uint _daylimit) public payable + constructor(address[] memory _owners, uint _required, uint _daylimit) payable multiowned(_owners, _required) daylimit(_daylimit) { } diff --git a/test/externalTests/solc-js/DAO/ManagedAccount.sol b/test/externalTests/solc-js/DAO/ManagedAccount.sol index 11b0b3c32..879de9587 100644 --- a/test/externalTests/solc-js/DAO/ManagedAccount.sol +++ b/test/externalTests/solc-js/DAO/ManagedAccount.sol @@ -42,7 +42,7 @@ abstract contract ManagedAccountInterface { contract ManagedAccount is ManagedAccountInterface{ // The constructor sets the owner of the account - constructor(address _owner, bool _payOwnerOnly) public { + constructor(address _owner, bool _payOwnerOnly) { owner = _owner; payOwnerOnly = _payOwnerOnly; } diff --git a/test/libsolidity/ABIDecoderTests.cpp b/test/libsolidity/ABIDecoderTests.cpp index 39bf7602c..5226aa0d6 100644 --- a/test/libsolidity/ABIDecoderTests.cpp +++ b/test/libsolidity/ABIDecoderTests.cpp @@ -318,7 +318,7 @@ BOOST_AUTO_TEST_CASE(decode_from_memory_simple) contract C { uint public _a; uint[] public _b; - constructor(uint a, uint[] memory b) public { + constructor(uint a, uint[] memory b) { _a = a; _b = b; } @@ -343,7 +343,7 @@ BOOST_AUTO_TEST_CASE(decode_function_type) string sourceCode = R"( contract D { function () external returns (uint) public _a; - constructor(function () external returns (uint) a) public { + constructor(function () external returns (uint) a) { _a = a; } } @@ -377,13 +377,13 @@ BOOST_AUTO_TEST_CASE(decode_function_type_array) string sourceCode = R"( contract D { function () external returns (uint)[] public _a; - constructor(function () external returns (uint)[] memory a) public { + constructor(function () external returns (uint)[] memory a) { _a = a; } } contract E { function () external returns (uint)[3] public _a; - constructor(function () external returns (uint)[3] memory a) public { + constructor(function () external returns (uint)[3] memory a) { _a = a; } } @@ -445,7 +445,7 @@ BOOST_AUTO_TEST_CASE(decode_from_memory_complex) uint public _a; uint[] public _b; bytes[2] public _c; - constructor(uint a, uint[] memory b, bytes[2] memory c) public { + constructor(uint a, uint[] memory b, bytes[2] memory c) { _a = a; _b = b; _c = c; diff --git a/test/libsolidity/ABIEncoderTests.cpp b/test/libsolidity/ABIEncoderTests.cpp index 777f991a3..9cb6f350b 100644 --- a/test/libsolidity/ABIEncoderTests.cpp +++ b/test/libsolidity/ABIEncoderTests.cpp @@ -718,7 +718,7 @@ BOOST_AUTO_TEST_CASE(struct_in_constructor) string c; } S public x; - constructor(S memory s) public { x = s; } + constructor(S memory s) { x = s; } } )"; @@ -738,7 +738,7 @@ BOOST_AUTO_TEST_CASE(struct_in_constructor_indirect) string c; } S public x; - constructor(S memory s) public { x = s; } + constructor(S memory s) { x = s; } } contract D { @@ -771,7 +771,7 @@ BOOST_AUTO_TEST_CASE(struct_in_constructor_data_short) string c; } S public x; - constructor(S memory s) public { x = s; } + constructor(S memory s) { x = s; } } )"; diff --git a/test/libsolidity/ABIJson/constructor_abi.sol b/test/libsolidity/ABIJson/constructor_abi.sol index d6cb1d495..ae07c9401 100644 --- a/test/libsolidity/ABIJson/constructor_abi.sol +++ b/test/libsolidity/ABIJson/constructor_abi.sol @@ -1,5 +1,5 @@ contract test { - constructor(uint param1, test param2, bool param3) public {} + constructor(uint param1, test param2, bool param3) {} } // ---- // :test diff --git a/test/libsolidity/ABIJson/internal_constructor.sol b/test/libsolidity/ABIJson/internal_constructor.sol index 7f8ea5ed2..47c783b5d 100644 --- a/test/libsolidity/ABIJson/internal_constructor.sol +++ b/test/libsolidity/ABIJson/internal_constructor.sol @@ -1,7 +1,7 @@ // bug #8712 -contract B { +abstract contract B { uint immutable x; - constructor(function() internal returns(uint) fp) internal { + constructor(function() internal returns(uint) fp) { x = fp(); } } // ---- diff --git a/test/libsolidity/ABIJson/payable_constructor_abi.sol b/test/libsolidity/ABIJson/payable_constructor_abi.sol index e9497b248..579e83efb 100644 --- a/test/libsolidity/ABIJson/payable_constructor_abi.sol +++ b/test/libsolidity/ABIJson/payable_constructor_abi.sol @@ -1,5 +1,5 @@ contract test { - constructor(uint param1, test param2, bool param3) public payable {} + constructor(uint param1, test param2, bool param3) payable {} } // ---- // :test diff --git a/test/libsolidity/ABIJson/return_param_in_abi.sol b/test/libsolidity/ABIJson/return_param_in_abi.sol index 92782a73d..23995d62a 100644 --- a/test/libsolidity/ABIJson/return_param_in_abi.sol +++ b/test/libsolidity/ABIJson/return_param_in_abi.sol @@ -1,7 +1,7 @@ // bug #1801 contract test { enum ActionChoices { GoLeft, GoRight, GoStraight, Sit } - constructor(ActionChoices param) public {} + constructor(ActionChoices param) {} function ret() public returns (ActionChoices) { ActionChoices action = ActionChoices.GoLeft; return action; diff --git a/test/libsolidity/ASTJSON/abstract_contract.json b/test/libsolidity/ASTJSON/abstract_contract.json index 27b74a32d..08b1e6d95 100644 --- a/test/libsolidity/ASTJSON/abstract_contract.json +++ b/test/libsolidity/ASTJSON/abstract_contract.json @@ -31,7 +31,7 @@ { "id": 3, "nodeType": "Block", - "src": "44:4:1", + "src": "37:4:1", "statements": [] }, "id": 4, @@ -52,18 +52,18 @@ "id": 2, "nodeType": "ParameterList", "parameters": [], - "src": "44:0:1" + "src": "37:0:1" }, "scope": 5, - "src": "23:25:1", + "src": "23:18:1", "stateMutability": "nonpayable", "virtual": false, - "visibility": "public" + "visibility": "internal" } ], "scope": 6, - "src": "0:50:1" + "src": "0:43:1" } ], - "src": "0:51:1" + "src": "0:44:1" } diff --git a/test/libsolidity/ASTJSON/abstract_contract.sol b/test/libsolidity/ASTJSON/abstract_contract.sol index 8ff9955c2..bddbc1779 100644 --- a/test/libsolidity/ASTJSON/abstract_contract.sol +++ b/test/libsolidity/ASTJSON/abstract_contract.sol @@ -1,5 +1,5 @@ abstract contract C { - constructor() public { + constructor() { } } diff --git a/test/libsolidity/ASTJSON/abstract_contract_legacy.json b/test/libsolidity/ASTJSON/abstract_contract_legacy.json index c345ab6ba..c13abca7f 100644 --- a/test/libsolidity/ASTJSON/abstract_contract_legacy.json +++ b/test/libsolidity/ASTJSON/abstract_contract_legacy.json @@ -49,7 +49,7 @@ "scope": 5, "stateMutability": "nonpayable", "virtual": false, - "visibility": "public" + "visibility": "internal" }, "children": [ @@ -77,7 +77,7 @@ "children": [], "id": 2, "name": "ParameterList", - "src": "44:0:1" + "src": "37:0:1" }, { "attributes": @@ -90,20 +90,20 @@ "children": [], "id": 3, "name": "Block", - "src": "44:4:1" + "src": "37:4:1" } ], "id": 4, "name": "FunctionDefinition", - "src": "23:25:1" + "src": "23:18:1" } ], "id": 5, "name": "ContractDefinition", - "src": "0:50:1" + "src": "0:43:1" } ], "id": 6, "name": "SourceUnit", - "src": "0:51:1" + "src": "0:44:1" } diff --git a/test/libsolidity/ASTJSON/constructor.json b/test/libsolidity/ASTJSON/constructor.json index 24a91d1fe..31747901e 100644 --- a/test/libsolidity/ASTJSON/constructor.json +++ b/test/libsolidity/ASTJSON/constructor.json @@ -31,7 +31,7 @@ { "id": 3, "nodeType": "Block", - "src": "35:4:1", + "src": "28:4:1", "statements": [] }, "id": 4, @@ -52,18 +52,18 @@ "id": 2, "nodeType": "ParameterList", "parameters": [], - "src": "35:0:1" + "src": "28:0:1" }, "scope": 5, - "src": "14:25:1", + "src": "14:18:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 6, - "src": "0:41:1" + "src": "0:34:1" } ], - "src": "0:42:1" + "src": "0:35:1" } diff --git a/test/libsolidity/ASTJSON/constructor.sol b/test/libsolidity/ASTJSON/constructor.sol index f89ac45b4..b2b1c6460 100644 --- a/test/libsolidity/ASTJSON/constructor.sol +++ b/test/libsolidity/ASTJSON/constructor.sol @@ -1,5 +1,5 @@ contract C { - constructor() public { + constructor() { } } diff --git a/test/libsolidity/ASTJSON/constructor_legacy.json b/test/libsolidity/ASTJSON/constructor_legacy.json index 108fbcdf0..68a648bc9 100644 --- a/test/libsolidity/ASTJSON/constructor_legacy.json +++ b/test/libsolidity/ASTJSON/constructor_legacy.json @@ -77,7 +77,7 @@ "children": [], "id": 2, "name": "ParameterList", - "src": "35:0:1" + "src": "28:0:1" }, { "attributes": @@ -90,20 +90,20 @@ "children": [], "id": 3, "name": "Block", - "src": "35:4:1" + "src": "28:4:1" } ], "id": 4, "name": "FunctionDefinition", - "src": "14:25:1" + "src": "14:18:1" } ], "id": 5, "name": "ContractDefinition", - "src": "0:41:1" + "src": "0:34:1" } ], "id": 6, "name": "SourceUnit", - "src": "0:42:1" + "src": "0:35:1" } diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp index 09e257664..38f980506 100644 --- a/test/libsolidity/GasMeter.cpp +++ b/test/libsolidity/GasMeter.cpp @@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(store_keccak256) char const* sourceCode = R"( contract test { bytes32 public shaValue; - constructor() public { + constructor() { shaValue = keccak256(abi.encodePacked(this)); } } @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(updating_store) contract test { uint data; uint data2; - constructor() public { + constructor() { data = 1; data = 2; data2 = 0; diff --git a/test/libsolidity/SolidityCompiler.cpp b/test/libsolidity/SolidityCompiler.cpp index 971a74a75..13f714e5e 100644 --- a/test/libsolidity/SolidityCompiler.cpp +++ b/test/libsolidity/SolidityCompiler.cpp @@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE(does_not_include_creation_time_only_internal_functions) char const* sourceCode = R"( contract C { uint x; - constructor() public { f(); } + constructor() { f(); } function f() internal { for (uint i = 0; i < 10; ++i) x += 3 + i; } } )"; diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 2d3e4f762..32b713259 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -980,7 +980,7 @@ BOOST_AUTO_TEST_CASE(constructor) char const* sourceCode = R"( contract test { mapping(uint => uint) data; - constructor() public { + constructor() { data[7] = 8; } function get(uint key) public returns (uint value) { @@ -1007,7 +1007,7 @@ BOOST_AUTO_TEST_CASE(blockchain) { char const* sourceCode = R"( contract test { - constructor() public payable {} + constructor() payable {} function someInfo() public payable returns (uint256 value, address coinbase, uint256 blockNumber) { value = msg.value; coinbase = block.coinbase; @@ -1029,7 +1029,7 @@ BOOST_AUTO_TEST_CASE(send_ether) { char const* sourceCode = R"( contract test { - constructor() payable public {} + constructor() payable {} function a(address payable addr, uint amount) public returns (uint ret) { addr.send(amount); return address(this).balance; @@ -1049,7 +1049,7 @@ BOOST_AUTO_TEST_CASE(transfer_ether) { char const* sourceCode = R"( contract A { - constructor() public payable {} + constructor() payable {} function a(address payable addr, uint amount) public returns (uint) { addr.transfer(amount); return address(this).balance; @@ -1205,7 +1205,7 @@ BOOST_AUTO_TEST_CASE(log_in_constructor) { char const* sourceCode = R"( contract test { - constructor() public { + constructor() { log1(bytes32(uint256(1)), bytes32(uint256(2))); } } @@ -1224,7 +1224,7 @@ BOOST_AUTO_TEST_CASE(selfdestruct) { char const* sourceCode = R"( contract test { - constructor() public payable {} + constructor() payable {} function a(address payable receiver) public returns (uint ret) { selfdestruct(receiver); return 10; @@ -1613,7 +1613,7 @@ BOOST_AUTO_TEST_CASE(constructor_with_long_arguments) string public a; string public b; - constructor(string memory _a, string memory _b) public { + constructor(string memory _a, string memory _b) { a = _a; b = _b; } @@ -1642,7 +1642,7 @@ BOOST_AUTO_TEST_CASE(contracts_as_addresses) } contract test { helper h; - constructor() public payable { h = new helper(); address(h).send(5); } + constructor() payable { h = new helper(); address(h).send(5); } function getBalance() public returns (uint256 myBalance, uint256 helperBalance) { myBalance = address(this).balance; helperBalance = address(h).balance; @@ -1719,8 +1719,8 @@ BOOST_AUTO_TEST_CASE(blockhash) BOOST_AUTO_TEST_CASE(internal_constructor) { char const* sourceCode = R"( - contract C { - constructor() internal {} + abstract contract C { + constructor() {} } )"; BOOST_CHECK(compileAndRunWithoutCheck({{"", sourceCode}}, 0, "C").empty()); @@ -2378,7 +2378,7 @@ BOOST_AUTO_TEST_CASE(generic_call) function recv(uint256 x) public payable { received = x; } } contract sender { - constructor() public payable {} + constructor() payable {} function doSend(address rec) public returns (uint d) { bytes4 signature = bytes4(bytes32(keccak256("recv(uint256)"))); @@ -2401,14 +2401,14 @@ BOOST_AUTO_TEST_CASE(generic_delegatecall) uint public received; address public sender; uint public value; - constructor() public payable {} + constructor() payable {} function recv(uint256 x) public payable { received = x; sender = msg.sender; value = msg.value; } } contract Sender { uint public received; address public sender; uint public value; - constructor() public payable {} + constructor() payable {} function doSend(address rec) public payable { bytes4 signature = bytes4(bytes32(keccak256("recv(uint256)"))); @@ -2449,7 +2449,7 @@ BOOST_AUTO_TEST_CASE(generic_staticcall) char const* sourceCode = R"**( contract A { uint public x; - constructor() public { x = 42; } + constructor() { x = 42; } function pureFunction(uint256 p) public pure returns (uint256) { return p; } function viewFunction(uint256 p) public view returns (uint256) { return p + x; } function nonpayableFunction(uint256 p) public returns (uint256) { x = p; return x; } @@ -2584,7 +2584,7 @@ BOOST_AUTO_TEST_CASE(call_forward_bytes) fallback() external { received = 0x80; } } contract sender { - constructor() public { rec = new receiver(); } + constructor() { rec = new receiver(); } fallback() external { savedData = msg.data; } function forward() public returns (bool) { address(rec).call(savedData); return true; } function clear() public returns (bool) { delete savedData; return true; } @@ -2613,7 +2613,7 @@ BOOST_AUTO_TEST_CASE(call_forward_bytes_length) } contract sender { receiver rec; - constructor() public { rec = new receiver(); } + constructor() { rec = new receiver(); } function viaCalldata() public returns (uint) { (bool success,) = address(rec).call(msg.data); require(success); @@ -2657,7 +2657,7 @@ BOOST_AUTO_TEST_CASE(copying_bytes_multiassign) fallback() external { received = 0x80; } } contract sender { - constructor() public { rec = new receiver(); } + constructor() { rec = new receiver(); } fallback() external { savedData1 = savedData2 = msg.data; } function forward(bool selector) public returns (bool) { if (selector) { address(rec).call(savedData1); delete savedData1; } @@ -3609,7 +3609,7 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_out_of_baund) contract A { uint public test = 1; uint[3] arr; - constructor() public + constructor() { uint index = 5; test = arr[index]; @@ -3631,7 +3631,7 @@ BOOST_AUTO_TEST_CASE(failing_send) } } contract Main { - constructor() public payable {} + constructor() payable {} function callHelper(address payable _a) public returns (bool r, uint bal) { r = !_a.send(5); bal = address(this).balance; @@ -3856,7 +3856,7 @@ BOOST_AUTO_TEST_CASE(bytes_in_constructors_unpacker) contract Test { uint public m_x; bytes public m_s; - constructor(uint x, bytes memory s) public { + constructor(uint x, bytes memory s) { m_x = x; m_s = s; } @@ -3877,7 +3877,7 @@ BOOST_AUTO_TEST_CASE(bytes_in_constructors_packer) contract Base { uint public m_x; bytes m_s; - constructor(uint x, bytes memory s) public { + constructor(uint x, bytes memory s) { m_x = x; m_s = s; } @@ -3886,7 +3886,7 @@ BOOST_AUTO_TEST_CASE(bytes_in_constructors_packer) } } contract Main is Base { - constructor(bytes memory s, uint x) Base(x, f(s)) public {} + constructor(bytes memory s, uint x) Base(x, f(s)) {} function f(bytes memory s) public returns (bytes memory) { return s; } @@ -3916,7 +3916,7 @@ BOOST_AUTO_TEST_CASE(arrays_in_constructors) contract Base { uint public m_x; address[] m_s; - constructor(uint x, address[] memory s) public { + constructor(uint x, address[] memory s) { m_x = x; m_s = s; } @@ -3925,7 +3925,7 @@ BOOST_AUTO_TEST_CASE(arrays_in_constructors) } } contract Main is Base { - constructor(address[] memory s, uint x) Base(x, f(s)) public {} + constructor(address[] memory s, uint x) Base(x, f(s)) {} function f(address[] memory s) public returns (address[] memory) { return s; } @@ -4468,7 +4468,7 @@ BOOST_AUTO_TEST_CASE(constant_string_literal) bytes32 constant public b = "abcdefghijklmnopq"; string constant public x = "abefghijklmnopqabcdefghijklmnopqabcdefghijklmnopqabca"; - constructor() public { + constructor() { string memory xx = x; bytes32 bb = b; } @@ -4969,7 +4969,7 @@ BOOST_AUTO_TEST_CASE(calldata_offset) { address[] _arr; string public last = "nd"; - constructor(address[] memory guardians) public + constructor(address[] memory guardians) { _arr = guardians; } @@ -4984,7 +4984,7 @@ BOOST_AUTO_TEST_CASE(reject_ether_sent_to_library) char const* sourceCode = R"( library lib {} contract c { - constructor() public payable {} + constructor() payable {} function f(address payable x) public returns (bool) { return x.send(1); } @@ -5203,10 +5203,10 @@ BOOST_AUTO_TEST_CASE(index_access_with_type_conversion) BOOST_AUTO_TEST_CASE(failed_create) { char const* sourceCode = R"( - contract D { constructor() public payable {} } + contract D { constructor() payable {} } contract C { uint public x; - constructor() public payable {} + constructor() payable {} function f(uint amount) public returns (D) { x++; return (new D){value: amount}(); @@ -5235,7 +5235,7 @@ BOOST_AUTO_TEST_CASE(correctly_initialize_memory_array_in_constructor) char const* sourceCode = R"( contract C { bool public success; - constructor() public { + constructor() { // Make memory dirty. assembly { for { let i := 0 } lt(i, 64) { i := add(i, 1) } { @@ -5272,7 +5272,7 @@ BOOST_AUTO_TEST_CASE(mutex) } contract Fund is mutexed { uint shares; - constructor() public payable { shares = msg.value; } + constructor() payable { shares = msg.value; } function withdraw(uint amount) public protected returns (uint) { // NOTE: It is very bad practice to write this function this way. // Please refer to the documentation of how to do this properly. @@ -5297,7 +5297,7 @@ BOOST_AUTO_TEST_CASE(mutex) uint callDepth; bool protected; function setProtected(bool _protected) public { protected = _protected; } - constructor(Fund _fund) public { fund = _fund; } + constructor(Fund _fund) { fund = _fund; } function attack() public returns (uint) { callDepth = 0; return attackInternal(); @@ -5537,7 +5537,7 @@ BOOST_AUTO_TEST_CASE(include_creation_bytecode_only_once) contract D { bytes a = hex"1237651237125387136581271652831736512837126583171583712358126123765123712538713658127165283173651283712658317158371235812612376512371253871365812716528317365128371265831715837123581261237651237125387136581271652831736512837126583171583712358126"; bytes b = hex"1237651237125327136581271252831736512837126583171383712358126123765125712538713658127165253173651283712658357158371235812612376512371a5387136581271652a317365128371265a317158371235812612a765123712538a13658127165a83173651283712a58317158371235a126"; - constructor(uint) public {} + constructor(uint) {} } contract Double { function f() public { @@ -5783,7 +5783,7 @@ BOOST_AUTO_TEST_CASE(bubble_up_error_messages_through_create) { char const* sourceCode = R"( contract E { - constructor() public { + constructor() { revert("message"); } } @@ -5897,7 +5897,7 @@ BOOST_AUTO_TEST_CASE(bare_call_return_data) { string sourceCode = R"DELIMITER( contract A { - constructor() public { + constructor() { } function return_bool() public pure returns(bool) { return true; @@ -5928,7 +5928,7 @@ BOOST_AUTO_TEST_CASE(bare_call_return_data) } contract C { A addr; - constructor() public { + constructor() { addr = new A(); } function f(string memory signature) public returns (bool, bytes memory) { @@ -6259,7 +6259,7 @@ BOOST_AUTO_TEST_CASE(abi_encodePackedV2_structs) } S s; event E(S indexed); - constructor() public { + constructor() { s.a = 0x12; s.b = -7; s.c[0] = 2; @@ -6324,7 +6324,7 @@ BOOST_AUTO_TEST_CASE(abi_encodePackedV2_arrayOfStrings) contract C { string[] x; event E(string[] indexed); - constructor() public { + constructor() { x.push("abc"); x.push("0123456789012345678901234567890123456789"); } @@ -6367,7 +6367,7 @@ BOOST_AUTO_TEST_CASE(event_signature_in_library) } } contract C { - constructor() public { + constructor() { L.f(); } } @@ -6695,7 +6695,7 @@ BOOST_AUTO_TEST_CASE(dirty_scratch_space_prior_to_constant_optimiser) char const* sourceCode = R"( contract C { event X(uint); - constructor() public { + constructor() { assembly { // make scratch space dirty mstore(0, 0x4242424242424242424242424242424242424242424242424242424242424242) diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index b97d7bd4d..65a8026a4 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE(implement_abstract_via_constructor) SourceUnit const* sourceUnit = nullptr; char const* text = R"( abstract contract base { function foo() public virtual; } - abstract contract foo is base { constructor() public {} } + abstract contract foo is base { constructor() {} } )"; sourceUnit = parseAndAnalyse(text); std::vector> nodes = sourceUnit->nodes(); diff --git a/test/libsolidity/SolidityNatspecJSON.cpp b/test/libsolidity/SolidityNatspecJSON.cpp index 48ddfac4d..e3ead6f05 100644 --- a/test/libsolidity/SolidityNatspecJSON.cpp +++ b/test/libsolidity/SolidityNatspecJSON.cpp @@ -1070,7 +1070,7 @@ BOOST_AUTO_TEST_CASE(user_constructor) char const* sourceCode = R"( contract test { /// @notice this is a really nice constructor - constructor(uint a, uint second) public { } + constructor(uint a, uint second) { } } )"; @@ -1090,7 +1090,7 @@ BOOST_AUTO_TEST_CASE(user_constructor_and_function) char const* sourceCode = R"( contract test { /// @notice this is a really nice constructor - constructor(uint a, uint second) public { } + constructor(uint a, uint second) { } /// another multiplier function mul(uint a, uint second) public returns(uint d) { return a * 7 + second; } } @@ -1117,7 +1117,7 @@ BOOST_AUTO_TEST_CASE(dev_constructor) /// @author Alex /// @param a the parameter a is really nice and very useful /// @param second the second parameter is not very useful, it just provides additional confusion - constructor(uint a, uint second) public { } + constructor(uint a, uint second) { } } )"; @@ -1144,7 +1144,7 @@ BOOST_AUTO_TEST_CASE(dev_constructor_return) /// @param a the parameter a is really nice and very useful /// @param second the second parameter is not very useful, it just provides additional confusion /// @return return should not work within constructors - constructor(uint a, uint second) public { } + constructor(uint a, uint second) { } } )"; @@ -1158,7 +1158,7 @@ BOOST_AUTO_TEST_CASE(dev_constructor_and_function) /// @author Alex /// @param a the parameter a is really nice and very useful /// @param second the second parameter is not very useful, it just provides additional confusion - constructor(uint a, uint second) public { } + constructor(uint a, uint second) { } /// @dev Multiplies a number by 7 and adds second parameter /// @param a Documentation for the first parameter starts here. /// Since it's a really complicated parameter we need 2 lines diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp index 5efc0f71e..6e4d359c8 100644 --- a/test/libsolidity/SolidityOptimizer.cpp +++ b/test/libsolidity/SolidityOptimizer.cpp @@ -378,7 +378,7 @@ BOOST_AUTO_TEST_CASE(computing_constants) uint m_b; uint m_c; uint m_d; - constructor() public { + constructor() { set(); } function set() public returns (uint) { @@ -562,7 +562,7 @@ BOOST_AUTO_TEST_CASE(dead_code_elimination_across_assemblies) char const* sourceCode = R"( contract DCE { function () internal returns (uint) stored; - constructor() public { + constructor() { stored = f; } function f() internal returns (uint) { return 7; } diff --git a/test/libsolidity/errorRecoveryTests/constructor_recovers.sol b/test/libsolidity/errorRecoveryTests/constructor_recovers.sol index 393a638ca..cc03f1e89 100644 --- a/test/libsolidity/errorRecoveryTests/constructor_recovers.sol +++ b/test/libsolidity/errorRecoveryTests/constructor_recovers.sol @@ -1,7 +1,7 @@ pragma solidity >=0.0.0; contract Error1 { - constructor() public { + constructor() { balances[tx.origin] = ; // missing RHS. } @@ -16,5 +16,5 @@ contract Error1 { } } // ---- -// ParserError 6933: (95-96): Expected primary expression. -// Warning 3347: (95-96): Recovered in Statement at ';'. +// ParserError 6933: (88-89): Expected primary expression. +// Warning 3347: (88-89): Recovered in Statement at ';'. diff --git a/test/libsolidity/errorRecoveryTests/missing_rhs.sol b/test/libsolidity/errorRecoveryTests/missing_rhs.sol index 6cd99f76a..aaf7a7509 100644 --- a/test/libsolidity/errorRecoveryTests/missing_rhs.sol +++ b/test/libsolidity/errorRecoveryTests/missing_rhs.sol @@ -1,11 +1,11 @@ pragma solidity >=0.0.0; contract Error3 { - constructor() public { + constructor() { balances[tx.origin] = ; // missing RHS. } } // ---- -// ParserError 6933: (95-96): Expected primary expression. -// Warning 3347: (95-96): Recovered in Statement at ';'. +// ParserError 6933: (88-89): Expected primary expression. +// Warning 3347: (88-89): Recovered in Statement at ';'. diff --git a/test/libsolidity/errorRecoveryTests/multiple_errors.sol b/test/libsolidity/errorRecoveryTests/multiple_errors.sol index 2beccac72..c0a0bd32c 100644 --- a/test/libsolidity/errorRecoveryTests/multiple_errors.sol +++ b/test/libsolidity/errorRecoveryTests/multiple_errors.sol @@ -6,7 +6,7 @@ pragma solidity >=0.0.0; contract Error4 { - constructor() public { + constructor() { balances[tx.origin] = 1 2; // missing operator } @@ -21,9 +21,9 @@ contract Error4 { } // ---- -// ParserError 6635: (249-250): Expected ';' but got 'Number' -// ParserError 6635: (471-479): Expected ';' but got identifier -// ParserError 6635: (529-533): Expected ';' but got 'emit' -// ParserError 6635: (577-583): Expected ',' but got 'return' -// ParserError 6933: (577-583): Expected primary expression. -// Warning 3796: (588-589): Recovered in Statement at ';'. +// ParserError 6635: (242-243): Expected ';' but got 'Number' +// ParserError 6635: (464-472): Expected ';' but got identifier +// ParserError 6635: (522-526): Expected ';' but got 'emit' +// ParserError 6635: (570-576): Expected ',' but got 'return' +// ParserError 6933: (570-576): Expected primary expression. +// Warning 3796: (581-582): Recovered in Statement at ';'. diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index 017de5d7b..6a34670ff 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -2,7 +2,7 @@ contract C { uint256 constant LEN = 3; uint256[LEN] public a; - constructor(uint256[LEN] memory _a) public { + constructor(uint256[LEN] memory _a) { a = _a; } } diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol index e85cb599e..c6e46a7fa 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol @@ -2,7 +2,7 @@ contract Creator { uint256 public r; address public ch; - constructor(address[3] memory s, uint256 x) public { + constructor(address[3] memory s, uint256 x) { r = x; ch = s[2]; } diff --git a/test/libsolidity/semanticTests/array/reusing_memory.sol b/test/libsolidity/semanticTests/array/reusing_memory.sol index 994a31db9..32f21b675 100644 --- a/test/libsolidity/semanticTests/array/reusing_memory.sol +++ b/test/libsolidity/semanticTests/array/reusing_memory.sol @@ -2,7 +2,7 @@ contract Helper { uint256 public flag; - constructor(uint256 x) public { + constructor(uint256 x) { flag = x; } } diff --git a/test/libsolidity/semanticTests/array/string_allocation_bug.sol b/test/libsolidity/semanticTests/array/string_allocation_bug.sol index 9c2ec2e53..d6dadb78a 100644 --- a/test/libsolidity/semanticTests/array/string_allocation_bug.sol +++ b/test/libsolidity/semanticTests/array/string_allocation_bug.sol @@ -7,7 +7,7 @@ contract Sample { } s[2] public p; - constructor() public { + constructor() { s memory m; m.x = 0xbbbb; m.y = 0xcccc; diff --git a/test/libsolidity/semanticTests/array/strings_in_struct.sol b/test/libsolidity/semanticTests/array/strings_in_struct.sol index a6ec607f4..bacf8dec7 100644 --- a/test/libsolidity/semanticTests/array/strings_in_struct.sol +++ b/test/libsolidity/semanticTests/array/strings_in_struct.sol @@ -8,7 +8,7 @@ contract buggystruct { string last; } - constructor() public { + constructor() { bug = Buggy(10, 20, 30, "asdfghjkl"); } diff --git a/test/libsolidity/semanticTests/calldata/calldata_internal_function_pointer.sol b/test/libsolidity/semanticTests/calldata/calldata_internal_function_pointer.sol index 539653219..1c900b497 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_internal_function_pointer.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_internal_function_pointer.sol @@ -1,6 +1,6 @@ contract C { function(bytes calldata) returns (byte) x; - constructor() public { x = f; } + constructor() { x = f; } function f(bytes calldata b) internal pure returns (byte) { return b[2]; } diff --git a/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol b/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol index ffb98ada1..76c18244e 100644 --- a/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol @@ -1,14 +1,14 @@ contract BaseBase { uint256 m_a; - constructor(uint256 a) public { + constructor(uint256 a) { m_a = a; } } contract Base is BaseBase(7) { - constructor() public { + constructor() { m_a *= m_a; } } diff --git a/test/libsolidity/semanticTests/constructor/callvalue_check.sol b/test/libsolidity/semanticTests/constructor/callvalue_check.sol index c096382d0..3b7c63a9d 100644 --- a/test/libsolidity/semanticTests/constructor/callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/callvalue_check.sol @@ -1,12 +1,12 @@ -contract A1 { constructor() public {} } +contract A1 { constructor() {} } contract B1 is A1 {} -contract A2 { constructor() public payable {} } +contract A2 { constructor() payable {} } contract B2 is A2 {} contract B3 {} -contract B4 { constructor() public {} } +contract B4 { constructor() {} } contract C { function createWithValue(bytes memory c, uint256 value) public payable returns (bool) { diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol index fe6a4c59b..bb271ec17 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol @@ -2,7 +2,7 @@ contract Main { bytes3 name; bool flag; - constructor(bytes3 x, bool f) public { + constructor(bytes3 x, bool f) { name = x; flag = f; } diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol index b29498083..c7534faaf 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol @@ -2,7 +2,7 @@ contract Helper { bytes3 name; bool flag; - constructor(bytes3 x, bool f) public { + constructor(bytes3 x, bool f) { name = x; flag = f; } @@ -20,7 +20,7 @@ contract Helper { contract Main { Helper h; - constructor() public { + constructor() { h = new Helper("abc", true); } diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index 10243f897..d59f2cd19 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -2,7 +2,7 @@ contract C { uint256 public a; uint256[3] public b; - constructor(uint256 _a, uint256[3] memory _b) public { + constructor(uint256 _a, uint256[3] memory _b) { a = _a; b = _b; } diff --git a/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol b/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol index 4517c9702..5310d097b 100644 --- a/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol +++ b/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol @@ -1,5 +1,5 @@ contract A { - constructor() public { + constructor() { address(this).call("123"); } } diff --git a/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol b/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol index 6f2f41428..44d376cb6 100644 --- a/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol @@ -1,7 +1,7 @@ contract BaseBase { uint256 m_a; - constructor(uint256 a) public { + constructor(uint256 a) { m_a = a; } diff --git a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol index 42db8582a..9eb3754ff 100644 --- a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol @@ -2,7 +2,7 @@ contract Test { bytes3 name; bool flag; - constructor() public { + constructor() { setName("abc"); } diff --git a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol index 56f92cd50..7549f1387 100644 --- a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol +++ b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol @@ -1,7 +1,7 @@ contract Test { bytes6 name; - constructor() public { + constructor() { function (bytes6 _name) internal setter = setName; setter("abcdef"); diff --git a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol index 9744aa3ce..0da5f49b7 100644 --- a/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol +++ b/test/libsolidity/semanticTests/constructor/no_callvalue_check.sol @@ -1,10 +1,10 @@ contract A1 {} -contract B1 is A1 { constructor() public payable {} } +contract B1 is A1 { constructor() payable {} } -contract A2 { constructor() public {} } -contract B2 is A2 { constructor() public payable {} } +contract A2 { constructor() {} } +contract B2 is A2 { constructor() payable {} } -contract B3 { constructor() public payable {} } +contract B3 { constructor() payable {} } contract C { function f() public payable returns (bool) { diff --git a/test/libsolidity/semanticTests/constructor/payable_constructor.sol b/test/libsolidity/semanticTests/constructor/payable_constructor.sol index 9a3c56ebe..143212cba 100644 --- a/test/libsolidity/semanticTests/constructor/payable_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/payable_constructor.sol @@ -1,5 +1,5 @@ contract C { - constructor() public payable {} + constructor() payable {} } // ==== diff --git a/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol index ab8ad47f9..72833717d 100644 --- a/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol @@ -2,7 +2,7 @@ contract C { uint256 public result_in_constructor; function(uint256) returns (uint256) internal x; - constructor() public { + constructor() { x = double; result_in_constructor = use(2); } diff --git a/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol index 7492a4281..04be9f8ed 100644 --- a/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol @@ -1,7 +1,7 @@ contract C { function() returns (uint256) internal x; - constructor() public { + constructor() { x = unused; } diff --git a/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol index 0a4295114..7b166489f 100644 --- a/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol @@ -8,7 +8,7 @@ library L { contract C { function() returns (uint256) internal x; - constructor() public { + constructor() { x = L.x; } diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol index 898edf6ad..61d801631 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol @@ -1,6 +1,6 @@ contract A { uint x; - constructor() public { + constructor() { x = 42; } function f() public returns(uint256) { diff --git a/test/libsolidity/semanticTests/constructor_with_params.sol b/test/libsolidity/semanticTests/constructor_with_params.sol index 19f0bdb57..e3ac5b386 100644 --- a/test/libsolidity/semanticTests/constructor_with_params.sol +++ b/test/libsolidity/semanticTests/constructor_with_params.sol @@ -2,7 +2,7 @@ contract C { uint public i; uint public k; - constructor(uint newI, uint newK) public { + constructor(uint newI, uint newK) { i = newI; k = newK; } diff --git a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol index 0ec347963..89cb202c6 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_diamond_inheritance.sol @@ -2,22 +2,22 @@ contract A { uint public i; uint public k; - constructor(uint newI, uint newK) public { + constructor(uint newI, uint newK) { i = newI; k = newK; } } abstract contract B is A { uint public j; - constructor(uint newJ) public { + constructor(uint newJ) { j = newJ; } } contract C is A { - constructor(uint newI, uint newK) A(newI, newK) public {} + constructor(uint newI, uint newK) A(newI, newK) {} } contract D is B, C { - constructor(uint newI, uint newK) B(newI) C(newI, newK + 1) public {} + constructor(uint newI, uint newK) B(newI) C(newI, newK + 1) {} } // ==== // compileViaYul: also diff --git a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol index 3419a9c25..d477bbc0d 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_inheritance.sol @@ -2,13 +2,13 @@ contract C { uint public i; uint public k; - constructor(uint newI, uint newK) public { + constructor(uint newI, uint newK) { i = newI; k = newK; } } contract D is C { - constructor(uint newI, uint newK) C(newI, newK + 1) public {} + constructor(uint newI, uint newK) C(newI, newK + 1) {} } // ==== // compileViaYul: also diff --git a/test/libsolidity/semanticTests/constructor_with_params_inheritance_2.sol b/test/libsolidity/semanticTests/constructor_with_params_inheritance_2.sol index f2c39e75e..e00969726 100644 --- a/test/libsolidity/semanticTests/constructor_with_params_inheritance_2.sol +++ b/test/libsolidity/semanticTests/constructor_with_params_inheritance_2.sol @@ -2,7 +2,7 @@ contract C { uint public i; uint public k; - constructor(uint newI, uint newK) public { + constructor(uint newI, uint newK) { i = newI; k = newK; } diff --git a/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol b/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol index fd4c96ce7..9d5492d1e 100644 --- a/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol +++ b/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol @@ -1,7 +1,7 @@ contract test { enum ActionChoices {GoLeft, GoRight, GoStraight} - constructor() public {} + constructor() {} function getChoiceExp(uint256 x) public returns (uint256 d) { choice = ActionChoices(x); diff --git a/test/libsolidity/semanticTests/enums/using_enums.sol b/test/libsolidity/semanticTests/enums/using_enums.sol index 883726f7c..b903e5182 100644 --- a/test/libsolidity/semanticTests/enums/using_enums.sol +++ b/test/libsolidity/semanticTests/enums/using_enums.sol @@ -1,7 +1,7 @@ contract test { enum ActionChoices {GoLeft, GoRight, GoStraight, Sit} - constructor() public { + constructor() { choices = ActionChoices.GoStraight; } diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_no_args.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_no_args.sol index eac910f05..f60827738 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_no_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_no_args.sol @@ -1,6 +1,6 @@ contract C { uint public i; - constructor() public { + constructor() { i = 2; } } diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol index 32c2910e2..56e458110 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_args.sol @@ -1,12 +1,12 @@ contract C { uint public i; - constructor(uint newI) public { + constructor(uint newI) { i = newI; } } contract D { C c; - constructor(uint v) public { + constructor(uint v) { c = new C(v); } function f() public returns (uint r) { diff --git a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol index 3bb9765a9..725a54b54 100644 --- a/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol +++ b/test/libsolidity/semanticTests/functionCall/creation_function_call_with_salt.sol @@ -1,12 +1,12 @@ contract C { uint public i; - constructor(uint newI) public { + constructor(uint newI) { i = newI; } } contract D { C c; - constructor(uint v) public { + constructor(uint v) { c = new C{salt: "abc"}(v); } function f() public returns (uint r) { diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index b9a56935f..5ca46b4e1 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -18,7 +18,7 @@ contract helper { contract test { helper h; - constructor() public payable { + constructor() payable { h = new helper(); } diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol index 46c922a9c..3da540807 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -15,7 +15,7 @@ contract helper { } contract test { helper h; - constructor() public payable { + constructor() payable { h = new helper(); } diff --git a/test/libsolidity/semanticTests/functionCall/member_accessors.sol b/test/libsolidity/semanticTests/functionCall/member_accessors.sol index 238d99a61..d7b2b3284 100644 --- a/test/libsolidity/semanticTests/functionCall/member_accessors.sol +++ b/test/libsolidity/semanticTests/functionCall/member_accessors.sol @@ -3,7 +3,7 @@ contract test { bytes6 public name; bytes32 public a_hash; address public an_address; - constructor() public { + constructor() { data = 8; name = "Celina"; a_hash = keccak256("\x7b"); diff --git a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol index 07f6ff51d..bb1b28b3e 100644 --- a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol +++ b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol @@ -6,7 +6,7 @@ contract Receiver { contract Main { - constructor() public payable {} + constructor() payable {} function s() public returns (bool) { Receiver r = new Receiver(); diff --git a/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol b/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol index ac802ee9e..353844723 100644 --- a/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol +++ b/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol @@ -15,7 +15,7 @@ contract Flow { success = true; } - constructor() public { + constructor() { stages[msg.sender] = stage0; } diff --git a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol index d829c1554..dc0731485 100644 --- a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol +++ b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol @@ -1,7 +1,7 @@ contract C { uint256 public initial; - constructor() public { + constructor() { initial = double(2); } diff --git a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol index f8230b21a..a778589ab 100644 --- a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol +++ b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol @@ -1,7 +1,7 @@ contract C { function(uint256) returns (uint256) internal x; - constructor() public { + constructor() { x = double; } diff --git a/test/libsolidity/semanticTests/getters/array_mapping_struct.sol b/test/libsolidity/semanticTests/getters/array_mapping_struct.sol index 534dcd8a6..d824897e8 100644 --- a/test/libsolidity/semanticTests/getters/array_mapping_struct.sol +++ b/test/libsolidity/semanticTests/getters/array_mapping_struct.sol @@ -5,7 +5,7 @@ contract C { } mapping(uint256 => Y)[] public m; mapping(uint256 => Y)[3] public n; - constructor() public { + constructor() { m.push(); m.push(); m[1][0].a = 1; diff --git a/test/libsolidity/semanticTests/getters/arrays.sol b/test/libsolidity/semanticTests/getters/arrays.sol index 2a8641a9b..184d6ce7f 100644 --- a/test/libsolidity/semanticTests/getters/arrays.sol +++ b/test/libsolidity/semanticTests/getters/arrays.sol @@ -1,6 +1,6 @@ contract C { uint8[][2] public a; - constructor() public { + constructor() { a[1].push(3); a[1].push(4); } diff --git a/test/libsolidity/semanticTests/getters/mapping.sol b/test/libsolidity/semanticTests/getters/mapping.sol index 5b28a0f06..194e44792 100644 --- a/test/libsolidity/semanticTests/getters/mapping.sol +++ b/test/libsolidity/semanticTests/getters/mapping.sol @@ -1,6 +1,6 @@ contract C { mapping(uint => mapping(uint => uint)) public x; - constructor() public { + constructor() { x[1][2] = 3; } } diff --git a/test/libsolidity/semanticTests/getters/mapping_array_struct.sol b/test/libsolidity/semanticTests/getters/mapping_array_struct.sol index 2b237c4df..60683dfc0 100644 --- a/test/libsolidity/semanticTests/getters/mapping_array_struct.sol +++ b/test/libsolidity/semanticTests/getters/mapping_array_struct.sol @@ -5,7 +5,7 @@ contract C { } mapping(uint256 => Y[]) public m; mapping(uint256 => Y[3]) public n; - constructor() public { + constructor() { m[1].push().a = 1; m[1][0].b = 2; m[1].push().a = 3; diff --git a/test/libsolidity/semanticTests/getters/mapping_of_string.sol b/test/libsolidity/semanticTests/getters/mapping_of_string.sol index ea0a8b8f8..319f0a655 100644 --- a/test/libsolidity/semanticTests/getters/mapping_of_string.sol +++ b/test/libsolidity/semanticTests/getters/mapping_of_string.sol @@ -1,6 +1,6 @@ contract C { mapping(string => uint8[3]) public x; - constructor() public { + constructor() { x["abc"][0] = 1; x["abc"][2] = 3; x["abc"][1] = 2; diff --git a/test/libsolidity/semanticTests/getters/mapping_to_struct.sol b/test/libsolidity/semanticTests/getters/mapping_to_struct.sol index fed9f6ec5..c2d70a35a 100644 --- a/test/libsolidity/semanticTests/getters/mapping_to_struct.sol +++ b/test/libsolidity/semanticTests/getters/mapping_to_struct.sol @@ -6,7 +6,7 @@ contract C { uint d; } mapping(uint => mapping(uint => S)) public x; - constructor() public { + constructor() { x[1][2].a = 3; x[1][2].b = 4; x[1][2].c = 5; diff --git a/test/libsolidity/semanticTests/getters/small_types.sol b/test/libsolidity/semanticTests/getters/small_types.sol index d970f9138..a26eba785 100644 --- a/test/libsolidity/semanticTests/getters/small_types.sol +++ b/test/libsolidity/semanticTests/getters/small_types.sol @@ -3,7 +3,7 @@ contract C { uint16 public b; uint128 public c; uint public d; - constructor() public { + constructor() { a = 3; b = 4; c = 5; diff --git a/test/libsolidity/semanticTests/getters/struct_with_bytes.sol b/test/libsolidity/semanticTests/getters/struct_with_bytes.sol index 2bbd7e8b8..477a1297f 100644 --- a/test/libsolidity/semanticTests/getters/struct_with_bytes.sol +++ b/test/libsolidity/semanticTests/getters/struct_with_bytes.sol @@ -7,7 +7,7 @@ contract C { } uint shifter; S public s; - constructor() public { + constructor() { s.a = 7; s.b = "abc"; s.c[0] = 9; diff --git a/test/libsolidity/semanticTests/getters/struct_with_bytes_simple.sol b/test/libsolidity/semanticTests/getters/struct_with_bytes_simple.sol index 974ca9e80..281b29c87 100644 --- a/test/libsolidity/semanticTests/getters/struct_with_bytes_simple.sol +++ b/test/libsolidity/semanticTests/getters/struct_with_bytes_simple.sol @@ -7,7 +7,7 @@ contract C { } uint shifter; S public s; - constructor() public { + constructor() { s.a = 7; s.b = "abc"; s.c[0] = 9; diff --git a/test/libsolidity/semanticTests/immutable/getter_call_in_constructor.sol b/test/libsolidity/semanticTests/immutable/getter_call_in_constructor.sol index e4aa474f2..2ef12c04a 100644 --- a/test/libsolidity/semanticTests/immutable/getter_call_in_constructor.sol +++ b/test/libsolidity/semanticTests/immutable/getter_call_in_constructor.sol @@ -1,7 +1,7 @@ contract A { uint immutable public x = 1; uint public y; - constructor() public { + constructor() { y = this.x(); } } diff --git a/test/libsolidity/semanticTests/immutable/inheritance.sol b/test/libsolidity/semanticTests/immutable/inheritance.sol index bca0ee889..0e131535e 100644 --- a/test/libsolidity/semanticTests/immutable/inheritance.sol +++ b/test/libsolidity/semanticTests/immutable/inheritance.sol @@ -1,25 +1,25 @@ contract A { uint8 immutable a; - constructor() public { + constructor() { a = 4; } } contract B is A { uint8 immutable b; - constructor() public { + constructor() { b = 3; } } contract C is A { uint8 immutable c; - constructor() public { + constructor() { c = 2; } } contract D is B, C { uint8 immutable d; - constructor() public { + constructor() { d = 1; } function f() public view returns (uint256, uint256, uint, uint) { diff --git a/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol b/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol index 0119a90a2..f046395d2 100644 --- a/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol +++ b/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol @@ -1,6 +1,6 @@ contract C { function() internal view returns(uint256) immutable z; - constructor() public { + constructor() { z = f; } function f() public view returns (uint256) { diff --git a/test/libsolidity/semanticTests/immutable/multi_creation.sol b/test/libsolidity/semanticTests/immutable/multi_creation.sol index 970ea9155..33820b18b 100644 --- a/test/libsolidity/semanticTests/immutable/multi_creation.sol +++ b/test/libsolidity/semanticTests/immutable/multi_creation.sol @@ -1,13 +1,13 @@ contract A { uint immutable a; - constructor() public { + constructor() { a = 7; } function f() public view returns (uint) { return a; } } contract B { uint immutable a; - constructor() public { + constructor() { a = 5; } function f() public view returns (uint) { return a; } @@ -16,7 +16,7 @@ contract C { uint immutable a; uint public x; uint public y; - constructor() public { + constructor() { a = 3; x = (new A()).f(); y = (new B()).f(); diff --git a/test/libsolidity/semanticTests/immutable/stub.sol b/test/libsolidity/semanticTests/immutable/stub.sol index a800ab904..eda441c75 100644 --- a/test/libsolidity/semanticTests/immutable/stub.sol +++ b/test/libsolidity/semanticTests/immutable/stub.sol @@ -1,7 +1,7 @@ contract C { uint256 immutable x; uint256 immutable y; - constructor() public { + constructor() { x = 42; y = 23; } diff --git a/test/libsolidity/semanticTests/immutable/use_scratch.sol b/test/libsolidity/semanticTests/immutable/use_scratch.sol index 442ef5636..71381fc9b 100644 --- a/test/libsolidity/semanticTests/immutable/use_scratch.sol +++ b/test/libsolidity/semanticTests/immutable/use_scratch.sol @@ -2,7 +2,7 @@ contract C { uint256 immutable x; uint256 immutable y; mapping(uint => uint) public m; - constructor(uint _a) public { + constructor(uint _a) { x = 42; y = 23; m[_a] = 7; diff --git a/test/libsolidity/semanticTests/interfaceID/lisa.sol b/test/libsolidity/semanticTests/interfaceID/lisa.sol index ea844dd81..885cf9b24 100644 --- a/test/libsolidity/semanticTests/interfaceID/lisa.sol +++ b/test/libsolidity/semanticTests/interfaceID/lisa.sol @@ -8,11 +8,11 @@ interface ERC165 { function supportsInterface(bytes4 interfaceID) external view returns (bool); } -contract ERC165MappingImplementation is ERC165 { +abstract contract ERC165MappingImplementation is ERC165 { /// @dev You must not set element 0xffffffff to true mapping(bytes4 => bool) internal supportedInterfaces; - constructor() internal { + constructor() { supportedInterfaces[this.supportsInterface.selector] = true; } @@ -27,7 +27,7 @@ interface Simpson { } contract Lisa is ERC165MappingImplementation, Simpson { - constructor() public { + constructor() { supportedInterfaces[this.is2D.selector ^ this.skinColor.selector] = true; } diff --git a/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol b/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol index 96f1a4742..c535df528 100644 --- a/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol +++ b/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol @@ -8,11 +8,11 @@ interface ERC165 { function supportsInterface(bytes4 interfaceID) external view returns (bool); } -contract ERC165MappingImplementation is ERC165 { +abstract contract ERC165MappingImplementation is ERC165 { /// @dev You must not set element 0xffffffff to true mapping(bytes4 => bool) internal supportedInterfaces; - constructor() internal { + constructor() { supportedInterfaces[this.supportsInterface.selector] = true; } @@ -27,7 +27,7 @@ interface Simpson { } contract Lisa is ERC165MappingImplementation, Simpson { - constructor() public { + constructor() { supportedInterfaces[type(Simpson).interfaceId] = true; } diff --git a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base.sol b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base.sol index 98922c389..e564c560c 100644 --- a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base.sol +++ b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base.sol @@ -1,5 +1,5 @@ contract Base { - constructor(uint256 i) public { + constructor(uint256 i) { m_i = i; } @@ -8,7 +8,7 @@ contract Base { contract Derived is Base { - constructor(uint256 i) public Base(i) {} + constructor(uint256 i) Base(i) {} } diff --git a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base.sol b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base.sol index cab918567..0ae3e1ce4 100644 --- a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base.sol +++ b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base.sol @@ -1,5 +1,5 @@ contract Base { - constructor(uint256 j) public { + constructor(uint256 j) { m_i = j; } @@ -8,12 +8,12 @@ contract Base { contract Base1 is Base { - constructor(uint256 k) public Base(k) {} + constructor(uint256 k) Base(k) {} } contract Derived is Base, Base1 { - constructor(uint256 i) public Base1(i) {} + constructor(uint256 i) Base1(i) {} } diff --git a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base_with_gap.sol b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base_with_gap.sol index ab7bada38..def996344 100644 --- a/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base_with_gap.sol +++ b/test/libsolidity/semanticTests/intheritance/pass_dynamic_arguments_to_the_base_base_with_gap.sol @@ -1,5 +1,5 @@ contract Base { - constructor(uint256 i) public { + constructor(uint256 i) { m_i = i; } @@ -8,12 +8,12 @@ contract Base { abstract contract Base1 is Base { - constructor(uint256 k) public {} + constructor(uint256 k) {} } contract Derived is Base, Base1 { - constructor(uint256 i) public Base(i) Base1(7) {} + constructor(uint256 i) Base(i) Base1(7) {} } diff --git a/test/libsolidity/semanticTests/intheritance/super_in_constructor.sol b/test/libsolidity/semanticTests/intheritance/super_in_constructor.sol index 33e270c9e..5be2158a2 100644 --- a/test/libsolidity/semanticTests/intheritance/super_in_constructor.sol +++ b/test/libsolidity/semanticTests/intheritance/super_in_constructor.sol @@ -22,7 +22,7 @@ contract C is A { contract D is B, C { uint256 data; - constructor() public { + constructor() { data = super.f() | 8; } diff --git a/test/libsolidity/semanticTests/intheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/intheritance/value_for_constructor.sol index 51cee33b0..057b3b8e4 100644 --- a/test/libsolidity/semanticTests/intheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/intheritance/value_for_constructor.sol @@ -2,7 +2,7 @@ contract Helper { bytes3 name; bool flag; - constructor(bytes3 x, bool f) public payable { + constructor(bytes3 x, bool f) payable { name = x; flag = f; } @@ -20,7 +20,7 @@ contract Helper { contract Main { Helper h; - constructor() public payable { + constructor() payable { h = (new Helper){value: 10}("abc", true); } diff --git a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_pure.sol b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_pure.sol index 902ca66c1..94e2cb45c 100644 --- a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_pure.sol +++ b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_pure.sol @@ -6,7 +6,7 @@ library L { contract C { uint256[] y; string x; - constructor() public { y.push(42); } + constructor() { y.push(42); } function f() public view returns (uint256) { return L.f(y); } diff --git a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_needed.sol b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_needed.sol index b9254c811..827fbb986 100644 --- a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_needed.sol +++ b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_needed.sol @@ -6,7 +6,7 @@ library L { contract C { uint256[] y; string x; - constructor() public { y.push(42); } + constructor() { y.push(42); } function f() public view returns (uint256) { return L.f(y); } diff --git a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_not_needed.sol b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_not_needed.sol index 450f74f1d..6f09b8478 100644 --- a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_not_needed.sol +++ b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_not_needed.sol @@ -5,7 +5,7 @@ library L { } contract C { uint256[] y; - constructor() public { y.push(42); } + constructor() { y.push(42); } function f() public view returns (uint256) { return L.f(y); } diff --git a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_staticcall.sol b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_staticcall.sol index dc394f7fa..d8cdb9a4d 100644 --- a/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_staticcall.sol +++ b/test/libsolidity/semanticTests/libraries/library_delegatecall_guard_view_staticcall.sol @@ -1,6 +1,6 @@ contract D { uint public x; - constructor() public { x = 42; } + constructor() { x = 42; } } library L { function f(D d) public view returns (uint256) { @@ -9,7 +9,7 @@ library L { } contract C { D d; - constructor() public { d = new D(); } + constructor() { d = new D(); } function f() public view returns (uint256) { return L.f(d); } diff --git a/test/libsolidity/semanticTests/libraries/library_function_selectors.sol b/test/libsolidity/semanticTests/libraries/library_function_selectors.sol index 305ccf39b..185c34492 100644 --- a/test/libsolidity/semanticTests/libraries/library_function_selectors.sol +++ b/test/libsolidity/semanticTests/libraries/library_function_selectors.sol @@ -5,7 +5,7 @@ library L { } contract C { uint256[] s; - constructor() public { while (s.length < 42) s.push(0); } + constructor() { while (s.length < 42) s.push(0); } function f() public returns (bool, bool, uint256) { (bool success, bytes memory data) = address(L).delegatecall(abi.encodeWithSelector(L.f.selector, 7)); return (L.f.selector == bytes4(keccak256("f(uint256)")), success, abi.decode(data, (uint256))); diff --git a/test/libsolidity/semanticTests/libraries/library_function_selectors_struct.sol b/test/libsolidity/semanticTests/libraries/library_function_selectors_struct.sol index f0c71dec7..ea3bfb682 100644 --- a/test/libsolidity/semanticTests/libraries/library_function_selectors_struct.sol +++ b/test/libsolidity/semanticTests/libraries/library_function_selectors_struct.sol @@ -6,7 +6,7 @@ library L { } contract C { L.S s; - constructor() public { s.a = 42; } + constructor() { s.a = 42; } function f() public returns (bool, bool, uint256) { uint256 s_ptr; diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol index f4a73ebeb..ebe8d6086 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol @@ -1,7 +1,7 @@ contract A { uint256 data; - constructor() public mod1 { + constructor() mod1 { f1(); } diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol index ac99b0cf7..c05f7e202 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol @@ -1,7 +1,7 @@ contract A { uint256 data; - constructor() public mod1 { + constructor() mod1 { data |= 2; } diff --git a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol index 4e62acc5e..16383f8b9 100644 --- a/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol +++ b/test/libsolidity/semanticTests/salted_create/salted_create_with_value.sol @@ -4,7 +4,7 @@ contract B function getBalance() public view returns (uint) { return address(this).balance * 1000 + x; } - constructor(uint _x) public payable { + constructor(uint _x) payable { x = _x; } } diff --git a/test/libsolidity/semanticTests/smoke/constructor.sol b/test/libsolidity/semanticTests/smoke/constructor.sol index 27e26f1eb..9cf435087 100644 --- a/test/libsolidity/semanticTests/smoke/constructor.sol +++ b/test/libsolidity/semanticTests/smoke/constructor.sol @@ -1,6 +1,6 @@ contract C { uint public state = 0; - constructor(uint _state) public payable { + constructor(uint _state) payable { state = _state; } function balance() public payable returns (uint256) { diff --git a/test/libsolidity/semanticTests/state_var_initialization.sol b/test/libsolidity/semanticTests/state_var_initialization.sol index ba97a9441..5da329fa4 100644 --- a/test/libsolidity/semanticTests/state_var_initialization.sol +++ b/test/libsolidity/semanticTests/state_var_initialization.sol @@ -2,7 +2,7 @@ contract C { uint public i = 1; uint public k = 2; - constructor() public { + constructor() { i = i + i; k = k - i; } diff --git a/test/libsolidity/semanticTests/state_variables_init_order_2.sol b/test/libsolidity/semanticTests/state_variables_init_order_2.sol index 9bdf9c70c..67e38da6b 100644 --- a/test/libsolidity/semanticTests/state_variables_init_order_2.sol +++ b/test/libsolidity/semanticTests/state_variables_init_order_2.sol @@ -8,7 +8,7 @@ contract A { } contract B is A { uint public z; - constructor() public { + constructor() { z = x; } } diff --git a/test/libsolidity/semanticTests/state_variables_init_order_3.sol b/test/libsolidity/semanticTests/state_variables_init_order_3.sol index 81a5a693d..0a0aad59b 100644 --- a/test/libsolidity/semanticTests/state_variables_init_order_3.sol +++ b/test/libsolidity/semanticTests/state_variables_init_order_3.sol @@ -2,7 +2,7 @@ contract A { uint public a = 42; uint public b; uint public c; - constructor(uint x) public { + constructor(uint x) { b = a; a = x; } @@ -14,7 +14,7 @@ contract B is A { uint public b_a; uint public b_b; uint public b_c; - constructor() public A(17) { b_a = a; b_b = b; b_c = c; } + constructor() A(17) { b_a = a; b_b = b; b_c = c; } } // ==== // compileViaYul: true diff --git a/test/libsolidity/semanticTests/storage/accessors_mapping_for_array.sol b/test/libsolidity/semanticTests/storage/accessors_mapping_for_array.sol index 01460a1c8..2a478f35f 100644 --- a/test/libsolidity/semanticTests/storage/accessors_mapping_for_array.sol +++ b/test/libsolidity/semanticTests/storage/accessors_mapping_for_array.sol @@ -1,7 +1,7 @@ contract test { mapping(uint => uint[8]) public data; mapping(uint => uint[]) public dynamicData; - constructor() public { + constructor() { data[2][2] = 8; for (uint i = 0; i < 3; i++) dynamicData[2].push(); diff --git a/test/libsolidity/semanticTests/storage/array_accessor.sol b/test/libsolidity/semanticTests/storage/array_accessor.sol index eb4d3ce36..599931a37 100644 --- a/test/libsolidity/semanticTests/storage/array_accessor.sol +++ b/test/libsolidity/semanticTests/storage/array_accessor.sol @@ -5,7 +5,7 @@ contract test { struct st { uint a; uint[] finalArray; } mapping(uint256 => mapping(uint256 => st[5])) public multiple_map; - constructor() public { + constructor() { data[0] = 8; dynamicData.push(); diff --git a/test/libsolidity/semanticTests/storage/complex_accessors.sol b/test/libsolidity/semanticTests/storage/complex_accessors.sol index 9b3fa7a3c..d1087f800 100644 --- a/test/libsolidity/semanticTests/storage/complex_accessors.sol +++ b/test/libsolidity/semanticTests/storage/complex_accessors.sol @@ -3,7 +3,7 @@ contract test { mapping(uint256 => bool) public to_bool_map; mapping(uint256 => uint256) public to_uint_map; mapping(uint256 => mapping(uint256 => uint256)) public to_multiple_map; - constructor() public { + constructor() { to_string_map[42] = "24"; to_bool_map[42] = false; to_uint_map[42] = 12; diff --git a/test/libsolidity/semanticTests/storage/simple_accessor.sol b/test/libsolidity/semanticTests/storage/simple_accessor.sol index aacfb93a0..70e8a331f 100644 --- a/test/libsolidity/semanticTests/storage/simple_accessor.sol +++ b/test/libsolidity/semanticTests/storage/simple_accessor.sol @@ -1,6 +1,6 @@ contract test { uint256 public data; - constructor() public { + constructor() { data = 8; } } diff --git a/test/libsolidity/semanticTests/storage/struct_accessor.sol b/test/libsolidity/semanticTests/storage/struct_accessor.sol index de57d4697..ea030de1a 100644 --- a/test/libsolidity/semanticTests/storage/struct_accessor.sol +++ b/test/libsolidity/semanticTests/storage/struct_accessor.sol @@ -1,7 +1,7 @@ contract test { struct Data { uint a; uint8 b; mapping(uint => uint) c; bool d; } mapping(uint => Data) public data; - constructor() public { + constructor() { data[7].a = 1; data[7].b = 2; data[7].c[0] = 3; diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol index fc0748b7f..89138b60b 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory.sol @@ -6,7 +6,7 @@ contract CopyTest { Tree storageTree; Tree[] children; - constructor() public { + constructor() { for (uint i = 0; i < 2; i++) storageTree.children.push(); for (uint i = 0; i < 23; i++) diff --git a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory_complex.sol b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory_complex.sol index e8a08e513..d14bff969 100644 --- a/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory_complex.sol +++ b/test/libsolidity/semanticTests/structs/conversion/recursive_storage_memory_complex.sol @@ -6,7 +6,7 @@ contract CopyTest { Tree storageTree; Tree childStorageTree; - constructor() public { + constructor() { storageTree.data = 0x42; for (uint i = 0; i < 2; i++) storageTree.children.push(childStorageTree); diff --git a/test/libsolidity/semanticTests/structs/delete_struct.sol b/test/libsolidity/semanticTests/structs/delete_struct.sol index 7f57ce63a..48de502c7 100644 --- a/test/libsolidity/semanticTests/structs/delete_struct.sol +++ b/test/libsolidity/semanticTests/structs/delete_struct.sol @@ -10,7 +10,7 @@ contract test { uint nestedValue; mapping (uint => bool) nestedMapping; } - constructor() public { + constructor() { toDelete = 5; str.topValue = 1; str.topMapping[0] = 1; diff --git a/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol b/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol index 8591131be..ca6dffb9d 100644 --- a/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol +++ b/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol @@ -6,7 +6,7 @@ contract test { testStruct data2; testStruct data3; - constructor() public { + constructor() { data1.m_value = 2; } diff --git a/test/libsolidity/semanticTests/structs/struct_constructor_nested.sol b/test/libsolidity/semanticTests/structs/struct_constructor_nested.sol index dbd67ab58..7ce22e45a 100644 --- a/test/libsolidity/semanticTests/structs/struct_constructor_nested.sol +++ b/test/libsolidity/semanticTests/structs/struct_constructor_nested.sol @@ -10,7 +10,7 @@ contract C { } S s; - constructor() public { + constructor() { uint256[3] memory s2; s2[1] = 9; s = S(1, s2, X(4, 5)); diff --git a/test/libsolidity/semanticTests/structs/struct_delete_member.sol b/test/libsolidity/semanticTests/structs/struct_delete_member.sol index fbaf7b6d9..2b3f41402 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_member.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_member.sol @@ -4,7 +4,7 @@ contract test { } testStruct data1; - constructor() public { + constructor() { data1.m_value = 2; } diff --git a/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol b/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol index 59d79da9f..b5c8a2cfa 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol @@ -4,7 +4,7 @@ contract test { } mapping(uint256 => testStruct) campaigns; - constructor() public { + constructor() { campaigns[0].m_value = 2; } diff --git a/test/libsolidity/semanticTests/structs/struct_named_constructor.sol b/test/libsolidity/semanticTests/structs/struct_named_constructor.sol index 5368b090e..f74cc90bd 100644 --- a/test/libsolidity/semanticTests/structs/struct_named_constructor.sol +++ b/test/libsolidity/semanticTests/structs/struct_named_constructor.sol @@ -5,7 +5,7 @@ contract C { } S public s; - constructor() public { + constructor() { s = S({a: 1, x: true}); } } diff --git a/test/libsolidity/semanticTests/tryCatch/create.sol b/test/libsolidity/semanticTests/tryCatch/create.sol index e80f1944a..ad7f734c7 100644 --- a/test/libsolidity/semanticTests/tryCatch/create.sol +++ b/test/libsolidity/semanticTests/tryCatch/create.sol @@ -1,8 +1,8 @@ contract Reverts { - constructor(uint) public { revert("test message."); } + constructor(uint) { revert("test message."); } } contract Succeeds { - constructor(uint) public { } + constructor(uint) { } } contract C { diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol index 26c02f3e3..15ebeca43 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol @@ -4,7 +4,7 @@ contract C { bool flag; - constructor() public { + constructor() { if (!flag) { flag = true; function() internal invalid; diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol index 710348a1a..323e47f8b 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol @@ -4,7 +4,7 @@ contract C { bool flag; - constructor() public { + constructor() { if (!flag) { flag = true; function() internal invalid; diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol index 835156567..a9ffff0b6 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol @@ -5,7 +5,7 @@ contract InvalidTest { function() internal storedFn; uint public x; - constructor() public { + constructor() { uint _y1; uint _y2; uint _y3; diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol index 8a11832c8..df28ca1cc 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol @@ -4,7 +4,7 @@ contract InvalidTest { bool flag; - constructor() public { + constructor() { function() internal invalid; storedFn = invalid; } diff --git a/test/libsolidity/semanticTests/various/balance.sol b/test/libsolidity/semanticTests/various/balance.sol index d6a80dbf9..99fdf4da7 100644 --- a/test/libsolidity/semanticTests/various/balance.sol +++ b/test/libsolidity/semanticTests/various/balance.sol @@ -1,5 +1,5 @@ contract test { - constructor() public payable {} + constructor() payable {} function getBalance() public returns (uint256 balance) { return address(this).balance; diff --git a/test/libsolidity/semanticTests/various/code_access_content.sol b/test/libsolidity/semanticTests/various/code_access_content.sol index 2c115d6c8..10ceec3a4 100644 --- a/test/libsolidity/semanticTests/various/code_access_content.sol +++ b/test/libsolidity/semanticTests/various/code_access_content.sol @@ -1,7 +1,7 @@ contract D { bytes32 public x; - constructor() public { + constructor() { bytes32 codeHash; assembly { let size := codesize() diff --git a/test/libsolidity/semanticTests/various/code_access_create.sol b/test/libsolidity/semanticTests/various/code_access_create.sol index 9029e59ec..9b8b3175e 100644 --- a/test/libsolidity/semanticTests/various/code_access_create.sol +++ b/test/libsolidity/semanticTests/various/code_access_create.sol @@ -1,7 +1,7 @@ contract D { uint256 x; - constructor() public { + constructor() { x = 7; } diff --git a/test/libsolidity/semanticTests/various/code_access_runtime.sol b/test/libsolidity/semanticTests/various/code_access_runtime.sol index cc1401c6f..67c2ce90b 100644 --- a/test/libsolidity/semanticTests/various/code_access_runtime.sol +++ b/test/libsolidity/semanticTests/various/code_access_runtime.sol @@ -1,7 +1,7 @@ contract D { uint256 x; - constructor() public { + constructor() { x = 7; } diff --git a/test/libsolidity/semanticTests/various/external_types_in_calls.sol b/test/libsolidity/semanticTests/various/external_types_in_calls.sol index 0e65511c1..1b3ab196a 100644 --- a/test/libsolidity/semanticTests/various/external_types_in_calls.sol +++ b/test/libsolidity/semanticTests/various/external_types_in_calls.sol @@ -1,7 +1,7 @@ contract C1 { C1 public bla; - constructor(C1 x) public { + constructor(C1 x) { bla = x; } } diff --git a/test/libsolidity/semanticTests/various/inline_member_init.sol b/test/libsolidity/semanticTests/various/inline_member_init.sol index cac10c786..15ad78fe1 100644 --- a/test/libsolidity/semanticTests/various/inline_member_init.sol +++ b/test/libsolidity/semanticTests/various/inline_member_init.sol @@ -1,5 +1,5 @@ contract test { - constructor() public { + constructor() { m_b = 6; m_c = 8; } diff --git a/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol b/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol index 7ee1028c9..00ea47451 100644 --- a/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol +++ b/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol @@ -1,5 +1,5 @@ contract Base { - constructor() public {} + constructor() {} uint256 m_base = 5; @@ -10,7 +10,7 @@ contract Base { contract Derived is Base { - constructor() public {} + constructor() {} uint256 m_derived = 6; diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index 7da77aab2..08b83401c 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -8,7 +8,7 @@ contract C { contract D { C c = new C(); - constructor() public payable {} + constructor() payable {} function f() public view returns (uint256) { return c.f(); diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index 64460d397..8d091ec98 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -8,7 +8,7 @@ contract helper { contract test { helper h; - constructor() public payable { + constructor() payable { h = new helper(); } diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index a588fad54..c81570626 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -8,7 +8,7 @@ contract helper { contract test { helper h; - constructor() public payable { + constructor() payable { h = new helper(); } diff --git a/test/libsolidity/semanticTests/viaYul/erc20.sol b/test/libsolidity/semanticTests/viaYul/erc20.sol index 2ba09521c..9a49a053b 100644 --- a/test/libsolidity/semanticTests/viaYul/erc20.sol +++ b/test/libsolidity/semanticTests/viaYul/erc20.sol @@ -8,7 +8,7 @@ contract ERC20 { mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; - constructor() public { + constructor() { _mint(msg.sender, 20); } diff --git a/test/libsolidity/semanticTests/viaYul/struct_member_access.sol b/test/libsolidity/semanticTests/viaYul/struct_member_access.sol index 60733d414..957226195 100644 --- a/test/libsolidity/semanticTests/viaYul/struct_member_access.sol +++ b/test/libsolidity/semanticTests/viaYul/struct_member_access.sol @@ -8,7 +8,7 @@ contract C { } S s; - constructor() public { + constructor() { s.a = 42; s.b.push(1); s.b.push(2); diff --git a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol index e66b8ad4f..71ee82fd3 100644 --- a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol @@ -1,7 +1,7 @@ contract BaseBase { uint256 m_a; - constructor(uint256 a) public { + constructor(uint256 a) { m_a = a; } diff --git a/test/libsolidity/smtCheckerTests/array_members/pop_constructor_safe.sol b/test/libsolidity/smtCheckerTests/array_members/pop_constructor_safe.sol index 4842ee56f..c462713df 100644 --- a/test/libsolidity/smtCheckerTests/array_members/pop_constructor_safe.sol +++ b/test/libsolidity/smtCheckerTests/array_members/pop_constructor_safe.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C { uint[] a; - constructor() public { + constructor() { a.push(); a.pop(); } diff --git a/test/libsolidity/smtCheckerTests/array_members/pop_constructor_unsafe.sol b/test/libsolidity/smtCheckerTests/array_members/pop_constructor_unsafe.sol index fc1264ddc..d7fc43fc4 100644 --- a/test/libsolidity/smtCheckerTests/array_members/pop_constructor_unsafe.sol +++ b/test/libsolidity/smtCheckerTests/array_members/pop_constructor_unsafe.sol @@ -2,9 +2,9 @@ pragma experimental SMTChecker; contract C { uint[] a; - constructor() public { + constructor() { a.pop(); } } // ---- -// Warning 2529: (83-90): Empty array "pop" detected here. +// Warning 2529: (76-83): Empty array "pop" detected here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe.sol b/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe.sol index f563504f4..dac9b10a0 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C { uint256[] x; - constructor() public { x.push(42); } + constructor() { x.push(42); } function f() public { x.push(23); assert(x[0] == 42 || x[0] == 23); diff --git a/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe_no_overflow_assumption.sol b/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe_no_overflow_assumption.sol index 7ed99a69e..6b4642bfd 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe_no_overflow_assumption.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_overflow_1_safe_no_overflow_assumption.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C { uint256[] x; - constructor() public { x.push(42); } + constructor() { x.push(42); } function f() public { x.push(23); assert(x[0] == 42); diff --git a/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol b/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol index b75ef605f..d88e553b7 100644 --- a/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol +++ b/test/libsolidity/smtCheckerTests/complex/slither/data_dependency.sol @@ -46,7 +46,7 @@ contract SolidityVar{ address addr_1; address addr_2; - constructor() public{ + constructor(){ addr_1 = msg.sender; } @@ -117,7 +117,7 @@ contract PropagateThroughReturnValue { } } // ---- -// Warning 2018: (1886-1954): Function state mutability can be restricted to view +// Warning 2018: (1879-1947): Function state mutability can be restricted to view // Warning 8115: (318-332): Assertion checker does not yet support the type of this variable. // Warning 8115: (338-347): Assertion checker does not yet support the type of this variable. // Warning 8115: (353-378): Assertion checker does not yet support the type of this variable. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash.sol index c0e9a7965..f98b1fc8e 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash.sol @@ -10,7 +10,7 @@ contract C { bytes32 sig_2; Crypto d; - constructor() public { + constructor() { owner = msg.sender; } @@ -26,4 +26,4 @@ contract C { } } // ---- -// Warning 4661: (430-452): Assertion violation happens here +// Warning 4661: (423-445): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_pure.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_pure.sol index 8aef1f312..8e0adad37 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_pure.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_pure.sol @@ -12,7 +12,7 @@ contract C { bytes32 sig_2; Crypto d; - constructor() public { + constructor() { owner = msg.sender; } @@ -28,4 +28,4 @@ contract C { } } // ---- -// Warning 4661: (438-460): Assertion violation happens here +// Warning 4661: (431-453): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state.sol index 3f6244e1e..2a2e79328 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state.sol @@ -16,7 +16,7 @@ contract C { uint z; State s; - constructor() public { + constructor() { owner = msg.sender; } @@ -34,5 +34,5 @@ contract C { } } // ---- -// Warning 5084: (551-561): Type conversion is not yet fully supported and might yield false positives. -// Warning 4661: (535-572): Assertion violation happens here +// Warning 5084: (544-554): Type conversion is not yet fully supported and might yield false positives. +// Warning 4661: (528-565): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol index 2439fc864..e862a8e9e 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol @@ -13,7 +13,7 @@ contract C { uint y; State s; - constructor() public { + constructor() { owner = msg.sender; } @@ -29,4 +29,4 @@ contract C { } } // ---- -// Warning 4661: (306-320): Assertion violation happens here +// Warning 4661: (299-313): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_indirect.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_indirect.sol index 9a8f9ed8e..46fae86b6 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_indirect.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_indirect.sol @@ -22,7 +22,7 @@ contract C { uint y; State s; - constructor() public { + constructor() { owner = msg.sender; } @@ -43,5 +43,5 @@ contract C { } // ---- // Warning 5084: (92-102): Type conversion is not yet fully supported and might yield false positives. -// Warning 4661: (459-473): Assertion violation happens here -// Warning 4661: (477-503): Assertion violation happens here +// Warning 4661: (452-466): Assertion violation happens here +// Warning 4661: (470-496): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol index c60b6b05d..39e9f0749 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol @@ -14,7 +14,7 @@ contract C { uint y; State s; - constructor() public { + constructor() { owner = msg.sender; } @@ -35,5 +35,5 @@ contract C { } // ---- // Warning 5084: (116-126): Type conversion is not yet fully supported and might yield false positives. -// Warning 4661: (388-402): Assertion violation happens here -// Warning 4661: (406-432): Assertion violation happens here +// Warning 4661: (381-395): Assertion violation happens here +// Warning 4661: (399-425): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_unsafe.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_unsafe.sol index 336d75b97..5465eb57b 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_unsafe.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_unsafe.sol @@ -16,7 +16,7 @@ contract C { uint z; State s; - constructor() public { + constructor() { owner = msg.sender; } @@ -38,6 +38,6 @@ contract C { } } // ---- -// Warning 4661: (442-468): Assertion violation happens here -// Warning 5084: (617-627): Type conversion is not yet fully supported and might yield false positives. -// Warning 4661: (601-638): Assertion violation happens here +// Warning 4661: (435-461): Assertion violation happens here +// Warning 5084: (610-620): Type conversion is not yet fully supported and might yield false positives. +// Warning 4661: (594-631): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_base_basic.sol b/test/libsolidity/smtCheckerTests/functions/constructor_base_basic.sol index f1ea2e053..155290dcc 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_base_basic.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_base_basic.sol @@ -2,13 +2,13 @@ pragma experimental SMTChecker; contract A { uint x; - constructor() public { + constructor() { x = 2; } } contract B is A { - constructor() A() public { + constructor() A() { x = 3; } } diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy.sol index 1521f833d..fd7c9663b 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy.sol @@ -1,16 +1,16 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } contract A is C { - constructor() C(2) public { + constructor() C(2) { assert(a == 2); assert(a == 3); } } // ---- -// Warning 4661: (166-180): Assertion violation happens here +// Warning 4661: (152-166): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_2.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_2.sol index 7efa68b94..126f5b745 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_2.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_2.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; -contract C { uint a; constructor(uint x) public { a = x; } } -contract A is C { constructor() C(2) public { assert(a == 2); } } -contract B is C { constructor() C(3) public { assert(a == 3); } } -contract J is C { constructor() C(3) public { assert(a == 4); } } +contract C { uint a; constructor(uint x) { a = x; } } +contract A is C { constructor() C(2) { assert(a == 2); } } +contract B is C { constructor() C(3) { assert(a == 3); } } +contract J is C { constructor() C(3) { assert(a == 4); } } // ---- -// Warning 4661: (271-285): Assertion violation happens here +// Warning 4661: (243-257): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_3.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_3.sol index 638b29f5e..6b59b9829 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_3.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_3.sol @@ -1,24 +1,24 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B is C { - constructor(uint x) public { + constructor(uint x) { a = x; } } contract A is B { - constructor(uint x) B(x) C(x + 2) public { + constructor(uint x) B(x) C(x + 2) { assert(a == x); assert(a == x + 1); } } // ---- -// Warning 2661: (217-222): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (265-270): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (253-271): Assertion violation happens here +// Warning 2661: (203-208): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (244-249): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (232-250): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_4.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_4.sol index aa964a102..c2466c0d1 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_4.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_4.sol @@ -1,23 +1,23 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B is C { - constructor(uint x) public { + constructor(uint x) { a = x; } } contract A is B { - constructor(uint x) C(x + 2) B(x + 1) public { + constructor(uint x) C(x + 2) B(x + 1) { assert(a == x + 1); } } // ---- -// Warning 2661: (221-226): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (212-217): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (251-256): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (207-212): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (198-203): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (230-235): Overflow (resulting value larger than 2**256 - 1) happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond.sol index 1427498c4..1e3166920 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond.sol @@ -1,31 +1,31 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B1 is C { - constructor(uint x) public { + constructor(uint x) { a = x; } } contract B2 is C { - constructor(uint x) C(x + 2) public { + constructor(uint x) C(x + 2) { a = x; } } contract A is B2, B1 { - constructor(uint x) B2(x) B1(x) public { + constructor(uint x) B2(x) B1(x) { assert(a == x); assert(a == x + 1); } } // ---- -// Warning 2661: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (342-347): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (330-348): Assertion violation happens here +// Warning 2661: (200-205): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (200-205): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (314-319): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (302-320): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_2.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_2.sol index 18505a24e..0ec12ffac 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_2.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_2.sol @@ -1,31 +1,31 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B1 is C { - constructor(uint x) public { + constructor(uint x) { a = x; } } contract B2 is C { - constructor(uint x) C(x + 2) public { + constructor(uint x) C(x + 2) { a = x; } } contract A is B2, B1 { - constructor(uint x) B1(x) B2(x) public { + constructor(uint x) B1(x) B2(x) { assert(a == x); assert(a == x + 1); } } // ---- -// Warning 2661: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (214-219): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (342-347): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (330-348): Assertion violation happens here +// Warning 2661: (200-205): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (200-205): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (314-319): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (302-320): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_3.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_3.sol index caa4e67e2..9f5d6d402 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_3.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_3.sol @@ -1,37 +1,37 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B1 is C { uint b1; - constructor(uint x) public { + constructor(uint x) { b1 = x + a; } } contract B2 is C { uint b2; - constructor(uint x) C(x + 2) public { + constructor(uint x) C(x + 2) { b2 = x + a; } } contract A is B2, B1 { - constructor(uint x) B2(x) B1(x) public { + constructor(uint x) B2(x) B1(x) { assert(b1 == b2); assert(b1 != b2); } } // ---- -// Warning 4144: (174-179): Underflow (resulting value less than 0) happens here -// Warning 2661: (174-179): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (239-244): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (262-267): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (239-244): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (262-267): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (174-179): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (362-378): Assertion violation happens here +// Warning 4144: (160-165): Underflow (resulting value less than 0) happens here +// Warning 2661: (160-165): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (225-230): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (241-246): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (225-230): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (241-246): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (160-165): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (334-350): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle.sol index b9e6232e2..64acae437 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract C { uint a; - constructor() public { + constructor() { a = 2; } } @@ -13,11 +13,11 @@ contract B2 is C { } contract A is B, B2 { - constructor(uint x) public { + constructor(uint x) { assert(a == 2); assert(a == 3); } } // ---- -// Warning 5667: (171-177): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (208-222): Assertion violation happens here +// Warning 5667: (164-170): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (194-208): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle_empty_base.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle_empty_base.sol index 7c35f4fae..2a196b23f 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle_empty_base.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_diamond_empty_middle_empty_base.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract C { uint a; - constructor() public { + constructor() { a = 2; } } @@ -10,7 +10,7 @@ contract B is C { } contract B2 is C { - constructor() public { + constructor() { assert(a == 2); } } diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_chain.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_chain.sol index 7e4a1a28f..6cb0cd8ab 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_chain.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_chain.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract F { uint a; - constructor() public { + constructor() { a = 2; } } @@ -12,11 +12,11 @@ contract C is D {} contract B is C {} contract A is B { - constructor(uint x) public { + constructor(uint x) { assert(a == 2); assert(a == 3); } } // ---- -// Warning 5667: (201-207): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (238-252): Assertion violation happens here +// Warning 5667: (194-200): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (224-238): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle.sol index 3e2d932e7..40a67ce2f 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract C { uint a; - constructor() public { + constructor() { a = 2; } } @@ -10,11 +10,11 @@ contract B is C { } contract A is B { - constructor(uint x) B() public { + constructor(uint x) B() { assert(a == 2); assert(a == 3); } } // ---- -// Warning 5667: (145-151): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (186-200): Assertion violation happens here +// Warning 5667: (138-144): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (172-186): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle_no_invocation.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle_no_invocation.sol index ffcc13c99..a3891d3bd 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle_no_invocation.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_empty_middle_no_invocation.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract C { uint a; - constructor() public { + constructor() { a = 2; } } @@ -10,10 +10,10 @@ contract B is C { } contract A is B { - constructor(uint x) public { + constructor(uint x) { assert(a == 3); } } // ---- -// Warning 5667: (145-151): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (164-178): Assertion violation happens here +// Warning 5667: (138-144): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (150-164): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain.sol index 189297364..ae93d962a 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain.sol @@ -1,30 +1,30 @@ pragma experimental SMTChecker; contract F { uint a; - constructor() public { + constructor() { a = 2; } } contract E is F {} contract D is E { - constructor() public { + constructor() { a = 3; } } contract C is D {} contract B is C { - constructor() public { + constructor() { a = 4; } } contract A is B { - constructor(uint x) public { + constructor(uint x) { assert(a == 4); assert(a == 5); } } // ---- -// Warning 5667: (275-281): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (312-326): Assertion violation happens here +// Warning 5667: (254-260): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (284-298): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_empty_base.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_empty_base.sol index 71cbbd13c..534c0eecb 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_empty_base.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_empty_base.sol @@ -1,20 +1,20 @@ pragma experimental SMTChecker; contract F { uint a; - constructor() public { + constructor() { a = 2; } } contract E is F {} contract D is E { - constructor() public { + constructor() { a = 3; } } contract C is D {} contract B is C { - constructor() public { + constructor() { assert(a == 3); a = 4; } diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_local_vars.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_local_vars.sol index 6f3e1e55f..b595f7951 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_local_vars.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_local_vars.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract F { uint a; - constructor() public { + constructor() { uint f = 2; a = f; } @@ -9,21 +9,21 @@ contract F { contract E is F {} contract D is E { - constructor() public { + constructor() { uint d = 3; a = d; } } contract C is D {} contract B is C { - constructor() public { + constructor() { uint b = 4; a = b; } } contract A is B { - constructor(uint x) public { + constructor(uint x) { uint a1 = 4; uint a2 = 5; assert(a == a1); @@ -31,5 +31,5 @@ contract A is B { } } // ---- -// Warning 5667: (317-323): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (385-400): Assertion violation happens here +// Warning 5667: (296-302): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 4661: (357-372): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params.sol index 179c9bc7b..60c3ce9ef 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params.sol @@ -1,30 +1,30 @@ pragma experimental SMTChecker; contract F { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract E is F {} abstract contract D is E { - constructor() public { + constructor() { a = 3; } } abstract contract C is D {} contract B is C { - constructor(uint x) F(x + 1) public { + constructor(uint x) F(x + 1) { } } contract A is B { - constructor(uint x) B(x) public { + constructor(uint x) B(x) { assert(a == 3); assert(a == 4); } } // ---- -// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (356-370): Assertion violation happens here +// Warning 2661: (247-252): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (247-252): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (328-342): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params_2.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params_2.sol index 6bbc33d1e..291636786 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params_2.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_mixed_chain_with_params_2.sol @@ -1,20 +1,20 @@ pragma experimental SMTChecker; contract F { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract E is F {} abstract contract D is E { - constructor() public { + constructor() { a = 3; } } abstract contract C is D {} contract B is C { - constructor() F(1) public { + constructor() F(1) { assert(a == 3); assert(a == 2); } @@ -23,5 +23,5 @@ contract B is C { contract A is B { } // ---- -// Warning 4661: (287-301): Assertion violation happens here -// Warning 4661: (287-301): Assertion violation happens here +// Warning 4661: (266-280): Assertion violation happens here +// Warning 4661: (266-280): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_modifier.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_modifier.sol index d0aa94920..6a15e4e93 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_modifier.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_modifier.sol @@ -2,16 +2,16 @@ pragma experimental SMTChecker; contract C { uint a; modifier n { _; a = 7; } - constructor(uint x) n public { + constructor(uint x) n { a = x; } } contract A is C { modifier m { a = 5; _; } - constructor() C(2) public { + constructor() C(2) { assert(a == 4); } } // ---- -// Warning 4661: (202-216): Assertion violation happens here +// Warning 4661: (188-202): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_same_var.sol b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_same_var.sol index 572c04aa8..daa89fe0a 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_same_var.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_hierarchy_same_var.sol @@ -1,17 +1,17 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } contract A is C { - constructor() C(2) public { + constructor() C(2) { assert(a == 0); assert(C.a == 0); } } // ---- -// Warning 4661: (148-162): Assertion violation happens here -// Warning 4661: (166-182): Assertion violation happens here +// Warning 4661: (134-148): Assertion violation happens here +// Warning 4661: (152-168): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_simple.sol b/test/libsolidity/smtCheckerTests/functions/constructor_simple.sol index 5503f66ab..cb8e7b560 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_simple.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_simple.sol @@ -3,7 +3,7 @@ pragma experimental SMTChecker; contract C { uint x; - constructor() public { + constructor() { assert(x == 0); x = 10; } @@ -13,4 +13,4 @@ contract C { } } // ---- -// Warning 4661: (148-162): Assertion violation happens here +// Warning 4661: (141-155): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_state_value.sol b/test/libsolidity/smtCheckerTests/functions/constructor_state_value.sol index b238a0c1b..f1657cddd 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_state_value.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_state_value.sol @@ -3,7 +3,7 @@ pragma experimental SMTChecker; contract C { uint x = 5; - constructor() public { + constructor() { assert(x == 5); x = 10; } @@ -13,4 +13,4 @@ contract C { } } // ---- -// Warning 4661: (152-166): Assertion violation happens here +// Warning 4661: (145-159): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_state_value_inherited.sol b/test/libsolidity/smtCheckerTests/functions/constructor_state_value_inherited.sol index 27b3c8b30..5b0c2b11a 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_state_value_inherited.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_state_value_inherited.sol @@ -5,7 +5,7 @@ contract B { } contract C is B { - constructor() public { + constructor() { assert(x == 5); x = 10; } @@ -15,4 +15,4 @@ contract C is B { } } // ---- -// Warning 4661: (172-186): Assertion violation happens here +// Warning 4661: (165-179): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_state_value_parameter.sol b/test/libsolidity/smtCheckerTests/functions/constructor_state_value_parameter.sol index 80e633f6a..19a36a7c0 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_state_value_parameter.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_state_value_parameter.sol @@ -3,15 +3,15 @@ pragma experimental SMTChecker; contract C { uint x = 5; - constructor(uint a, uint b) public { + constructor(uint a, uint b) { assert(x == 5); x = a + b; } - function f(uint y) public view { + function f(uint y) view public { assert(y == x); } } // ---- -// Warning 4661: (169-183): Assertion violation happens here -// Warning 2661: (122-127): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (162-176): Assertion violation happens here +// Warning 2661: (115-120): Overflow (resulting value larger than 2**256 - 1) happens here diff --git a/test/libsolidity/smtCheckerTests/functions/constructor_this.sol b/test/libsolidity/smtCheckerTests/functions/constructor_this.sol index 591cd8245..a72dc095b 100644 --- a/test/libsolidity/smtCheckerTests/functions/constructor_this.sol +++ b/test/libsolidity/smtCheckerTests/functions/constructor_this.sol @@ -1,7 +1,7 @@ pragma experimental SMTChecker; contract C { function f() public pure {} - constructor() public { + constructor() { C c = this; c.f(); // this does not warn now, but should warn in the future this.f(); @@ -9,5 +9,5 @@ contract C { } } // ---- -// Warning 5805: (204-208): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. -// Warning 5805: (223-227): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. +// Warning 5805: (197-201): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. +// Warning 5805: (216-220): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. diff --git a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1.sol b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1.sol index 3ea4f4c46..05d965aa3 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C{ uint x; - constructor(uint y) public { + constructor(uint y) { assert(x == 0); x = 1; } @@ -21,5 +21,5 @@ contract C{ } // ---- // Warning 5667: (70-76): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 2661: (163-166): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4144: (245-248): Underflow (resulting value less than 0) happens here +// Warning 2661: (156-159): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4144: (238-241): Underflow (resulting value less than 0) happens here diff --git a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1_fail.sol index d43391255..f704de56c 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_1_fail.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C{ uint x; - constructor(uint y) public { + constructor(uint y) { assert(x == 1); x = 1; } @@ -21,12 +21,12 @@ contract C{ } // ---- // Warning 5667: (70-76): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (145-159): Assertion violation happens here -// Warning 2661: (163-166): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (227-241): Assertion violation happens here -// Warning 4661: (252-266): Assertion violation happens here -// Warning 4661: (177-191): Assertion violation happens here -// Warning 4661: (227-241): Assertion violation happens here -// Warning 4144: (245-248): Underflow (resulting value less than 0) happens here -// Warning 4661: (252-266): Assertion violation happens here -// Warning 4661: (89-103): Assertion violation happens here +// Warning 4661: (138-152): Assertion violation happens here +// Warning 2661: (156-159): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (220-234): Assertion violation happens here +// Warning 4661: (245-259): Assertion violation happens here +// Warning 4661: (170-184): Assertion violation happens here +// Warning 4661: (220-234): Assertion violation happens here +// Warning 4144: (238-241): Underflow (resulting value less than 0) happens here +// Warning 4661: (245-259): Assertion violation happens here +// Warning 4661: (82-96): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1.sol b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1.sol index ec3b88ed5..067ce603b 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1.sol @@ -9,7 +9,7 @@ contract A { } contract C is A { - constructor() public { + constructor() { assert(x == 0); ++x; f(); diff --git a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1_fail.sol index 1e2390164..3fd4a7477 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_call_with_assertion_inheritance_1_fail.sol @@ -9,7 +9,7 @@ contract A { } contract C is A { - constructor() public { + constructor() { assert(x == 1); ++x; f(); @@ -21,6 +21,6 @@ contract C is A { // Warning 4144: (100-103): Underflow (resulting value less than 0) happens here // Warning 4661: (82-96): Assertion violation happens here // Warning 4144: (100-103): Underflow (resulting value less than 0) happens here -// Warning 4661: (155-169): Assertion violation happens here +// Warning 4661: (148-162): Assertion violation happens here // Warning 4661: (82-96): Assertion violation happens here -// Warning 4661: (187-201): Assertion violation happens here +// Warning 4661: (180-194): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1.sol b/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1.sol index 338a91cd7..f8ec40ab7 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C{ uint x; - constructor(uint y) public { + constructor(uint y) { assert(x == 0); x = 1; } @@ -21,7 +21,7 @@ contract C{ } // ---- // Warning 5667: (70-76): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 2661: (156-159): Overflow (resulting value larger than 2**256 - 1) happens here // Warning 2661: (163-166): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (170-173): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (241-244): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4144: (241-244): Underflow (resulting value less than 0) happens here +// Warning 2661: (234-237): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4144: (234-237): Underflow (resulting value less than 0) happens here diff --git a/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1_fail.sol index 509bf241d..f3fda1b8a 100644 --- a/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/internal_multiple_calls_with_assertion_1_fail.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C{ uint x; - constructor(uint y) public { + constructor(uint y) { assert(x == 1); x = 1; } @@ -21,10 +21,10 @@ contract C{ } // ---- // Warning 5667: (70-76): Unused function parameter. Remove or comment out the variable name to silence this warning. -// Warning 4661: (145-159): Assertion violation happens here +// Warning 4661: (138-152): Assertion violation happens here +// Warning 2661: (156-159): Overflow (resulting value larger than 2**256 - 1) happens here // Warning 2661: (163-166): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (170-173): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (241-244): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (191-205): Assertion violation happens here -// Warning 4144: (241-244): Underflow (resulting value less than 0) happens here -// Warning 4661: (89-103): Assertion violation happens here +// Warning 2661: (234-237): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (184-198): Assertion violation happens here +// Warning 4144: (234-237): Underflow (resulting value less than 0) happens here +// Warning 4661: (82-96): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_hierarchy_mixed_chain_with_params.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_hierarchy_mixed_chain_with_params.sol index 179c9bc7b..60c3ce9ef 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_hierarchy_mixed_chain_with_params.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_hierarchy_mixed_chain_with_params.sol @@ -1,30 +1,30 @@ pragma experimental SMTChecker; contract F { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract E is F {} abstract contract D is E { - constructor() public { + constructor() { a = 3; } } abstract contract C is D {} contract B is C { - constructor(uint x) F(x + 1) public { + constructor(uint x) F(x + 1) { } } contract A is B { - constructor(uint x) B(x) public { + constructor(uint x) B(x) { assert(a == 3); assert(a == 4); } } // ---- -// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (356-370): Assertion violation happens here +// Warning 2661: (247-252): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (247-252): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (328-342): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init.sol index ec6c995e5..ccb9a9386 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init.sol @@ -2,10 +2,10 @@ pragma experimental SMTChecker; contract C { uint x = 2; - constructor () public { + constructor () { assert(x == 2); assert(x == 3); } } // ---- -// Warning 4661: (104-118): Assertion violation happens here +// Warning 4661: (97-111): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_base.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_base.sol index 8112ddb59..876616fa7 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_base.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_base.sol @@ -5,10 +5,10 @@ contract C { } contract D is C { - constructor() public { + constructor() { assert(x == 2); assert(x == 3); } } // ---- -// Warning 4661: (124-138): Assertion violation happens here +// Warning 4661: (117-131): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain.sol index c7b42c043..fac5f2545 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain.sol @@ -5,18 +5,18 @@ contract A { } contract B is A { - constructor() public { x = 2; } + constructor() { x = 2; } } contract C is B { - constructor() public { x = 3; } + constructor() { x = 3; } } contract D is C { - constructor() public { + constructor() { assert(x == 3); assert(x == 2); } } // ---- -// Warning 4661: (232-246): Assertion violation happens here +// Warning 4661: (211-225): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_alternate.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_alternate.sol index 820829a9e..bba7fc27b 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_alternate.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_alternate.sol @@ -5,17 +5,17 @@ contract A { } contract B is A { - constructor() public { x = 2; } + constructor() { x = 2; } } contract C is B { } contract D is C { - constructor() public { + constructor() { assert(x == 2); assert(x == 3); } } // ---- -// Warning 4661: (199-213): Assertion violation happens here +// Warning 4661: (185-199): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all.sol index c75e003b2..0f391dac3 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all.sol @@ -1,20 +1,20 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B is C { uint b; - constructor(uint x) public { + constructor(uint x) { b = a + x; } } contract A is B { - constructor(uint x) B(x) C(x + 2) public { + constructor(uint x) B(x) C(x + 2) { assert(a == x + 2); assert(b == x + x + 2); assert(a == x + 5); @@ -22,12 +22,12 @@ contract A is B { } // ---- -// Warning 4144: (171-176): Underflow (resulting value less than 0) happens here -// Warning 2661: (171-176): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (230-235): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (171-176): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (260-265): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (282-287): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (282-291): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (308-313): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (296-314): Assertion violation happens here +// Warning 4144: (157-162): Underflow (resulting value less than 0) happens here +// Warning 2661: (157-162): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (216-221): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (157-162): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (239-244): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (261-270): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (287-292): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (275-293): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all_2.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all_2.sol index cac139446..5912dd855 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all_2.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_chain_run_all_2.sol @@ -1,20 +1,20 @@ pragma experimental SMTChecker; contract C { uint a; - constructor(uint x) public { + constructor(uint x) { a = x; } } abstract contract B is C { uint b; - constructor(uint x) public { + constructor(uint x) { b = x + 10; } } contract A is B { - constructor(uint x) B(x) C(x + 2) public { + constructor(uint x) B(x) C(x + 2) { assert(a == x + 2); assert(b == x + 10); assert(b == x + 5); @@ -22,10 +22,10 @@ contract A is B { } // ---- -// Warning 2661: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (231-236): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (171-177): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (261-266): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (283-289): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 2661: (306-311): Overflow (resulting value larger than 2**256 - 1) happens here -// Warning 4661: (294-312): Assertion violation happens here +// Warning 2661: (157-163): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (217-222): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (157-163): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (240-245): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (262-268): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 2661: (285-290): Overflow (resulting value larger than 2**256 - 1) happens here +// Warning 4661: (273-291): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond.sol index 066651f72..4841d6fa2 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond.sol @@ -11,10 +11,10 @@ contract C is A { } contract D is B, C { - constructor() public { + constructor() { assert(x == 2); assert(x == 3); } } // ---- -// Warning 4661: (169-183): Assertion violation happens here +// Warning 4661: (162-176): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond_middle.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond_middle.sol index 1b5563c69..ba2cb9549 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond_middle.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_diamond_middle.sol @@ -5,18 +5,18 @@ contract A { } contract B is A { - constructor() public { x = 2; } + constructor() { x = 2; } } contract C is A { - constructor() public { x = 3; } + constructor() { x = 3; } } contract D is B, C { - constructor() public { + constructor() { assert(x == 3); assert(x == 4); } } // ---- -// Warning 4661: (235-249): Assertion violation happens here +// Warning 4661: (214-228): Assertion violation happens here diff --git a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_function_call.sol b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_function_call.sol index 36c8ce551..451ef0c96 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_function_call.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/constructor_state_variable_init_function_call.sol @@ -2,7 +2,7 @@ pragma experimental SMTChecker; contract C { uint x = f(2); - constructor () public { + constructor () { assert(x == 2); } diff --git a/test/libsolidity/smtCheckerTests/inheritance/implicit_constructor_hierarchy.sol b/test/libsolidity/smtCheckerTests/inheritance/implicit_constructor_hierarchy.sol index 37210a843..4c8835950 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/implicit_constructor_hierarchy.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/implicit_constructor_hierarchy.sol @@ -2,11 +2,11 @@ pragma experimental SMTChecker; contract A { uint x; - constructor (uint y) public { assert(x == 0); x = y; } + constructor (uint y) { assert(x == 0); x = y; } } contract B is A { - constructor () A(2) public { assert(x == 2); } + constructor () A(2) { assert(x == 2); } } contract C is B { diff --git a/test/libsolidity/syntaxTests/abstract/abstract_contract_instantiation.sol b/test/libsolidity/syntaxTests/abstract/abstract_contract_instantiation.sol index 1c374383c..560f47373 100644 --- a/test/libsolidity/syntaxTests/abstract/abstract_contract_instantiation.sol +++ b/test/libsolidity/syntaxTests/abstract/abstract_contract_instantiation.sol @@ -1,5 +1,5 @@ abstract contract AbstractContract { - constructor() public { } + constructor() { } function utterance() public returns (bytes32) { return "miaow"; } } @@ -9,4 +9,4 @@ contract Test { } } // ---- -// TypeError 4614: (215-235): Cannot instantiate an abstract contract. +// TypeError 4614: (208-228): Cannot instantiate an abstract contract. diff --git a/test/libsolidity/syntaxTests/abstract/contract.sol b/test/libsolidity/syntaxTests/abstract/contract.sol index 0888b8fb9..799b4ca64 100644 --- a/test/libsolidity/syntaxTests/abstract/contract.sol +++ b/test/libsolidity/syntaxTests/abstract/contract.sol @@ -1 +1 @@ -abstract contract A { constructor() public {} } +abstract contract A { constructor() {} } diff --git a/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol index 3f989b001..491c688cc 100644 --- a/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol +++ b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol @@ -6,10 +6,10 @@ contract Test { } contract Parent { - constructor(address _address) public {} + constructor(address _address) {} } contract Child is Parent { } // ---- -// TypeError 3656: (233-261): Contract "Child" should be marked as abstract. +// TypeError 3656: (226-254): Contract "Child" should be marked as abstract. diff --git a/test/libsolidity/syntaxTests/constructor/calldata_constructor_args.sol b/test/libsolidity/syntaxTests/constructor/calldata_constructor_args.sol index c4ce52102..5562117ce 100644 --- a/test/libsolidity/syntaxTests/constructor/calldata_constructor_args.sol +++ b/test/libsolidity/syntaxTests/constructor/calldata_constructor_args.sol @@ -2,4 +2,4 @@ contract C { constructor(uint[] calldata) public {} } // ---- -// TypeError 6651: (29-44): Data location must be "memory" for parameter in function, but "calldata" was given. +// TypeError 6651: (29-44): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given. diff --git a/test/libsolidity/syntaxTests/constructor/constructible_internal_constructor.sol b/test/libsolidity/syntaxTests/constructor/constructible_internal_constructor.sol index 8dee4c712..de68229c9 100644 --- a/test/libsolidity/syntaxTests/constructor/constructible_internal_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/constructible_internal_constructor.sol @@ -1,6 +1,6 @@ -contract C { - constructor() internal {} +abstract contract C { + constructor() {} } contract D is C { - constructor() public { } + constructor() { } } diff --git a/test/libsolidity/syntaxTests/constructor/constructor.sol b/test/libsolidity/syntaxTests/constructor/constructor.sol index aa3422cc2..4e5c360a7 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor.sol @@ -1 +1 @@ -contract A { constructor() public {} } +contract A { constructor() {} } diff --git a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol b/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol deleted file mode 100644 index 0b8f45947..000000000 --- a/test/libsolidity/syntaxTests/constructor/constructor_no_visibility.sol +++ /dev/null @@ -1,3 +0,0 @@ -contract A { constructor() {} } -// ---- -// SyntaxError 4937: (13-29): No visibility specified. Did you intend to add "public"? diff --git a/test/libsolidity/syntaxTests/constructor/constructor_override.sol b/test/libsolidity/syntaxTests/constructor/constructor_override.sol index ddcafcf7a..c0e363f35 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_override.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_override.sol @@ -1,5 +1,5 @@ contract C { - constructor() override public {} + constructor() override {} } // ---- -// TypeError 1209: (17-49): Constructors cannot override. +// TypeError 1209: (17-42): Constructors cannot override. diff --git a/test/libsolidity/syntaxTests/constructor/constructor_payable.sol b/test/libsolidity/syntaxTests/constructor/constructor_payable.sol index e5c6ac28d..8885e6256 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_payable.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_payable.sol @@ -1,5 +1,5 @@ contract C { - constructor() public payable { } + constructor() payable { } } contract D { diff --git a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability.sol b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability.sol index 37bf60bb5..487009d07 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_state_mutability.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_state_mutability.sol @@ -1,9 +1,9 @@ contract test1 { - constructor() public view {} + constructor() view {} } contract test2 { - constructor() public pure {} + constructor() pure {} } // ---- -// TypeError 1558: (19-47): Constructor must be payable or non-payable, but is "view". -// TypeError 1558: (69-97): Constructor must be payable or non-payable, but is "pure". +// TypeError 1558: (19-40): Constructor must be payable or non-payable, but is "view". +// TypeError 1558: (62-83): Constructor must be payable or non-payable, but is "pure". diff --git a/test/libsolidity/syntaxTests/constructor/constructor_virtual.sol b/test/libsolidity/syntaxTests/constructor/constructor_virtual.sol index 7d75eec38..61955b6ef 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_virtual.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_virtual.sol @@ -1,5 +1,5 @@ contract C { - constructor() virtual public {} + constructor() virtual {} } // ---- -// TypeError 7001: (17-48): Constructors cannot be virtual. +// TypeError 7001: (17-41): Constructors cannot be virtual. diff --git a/test/libsolidity/syntaxTests/constructor/constructor_visibility.sol b/test/libsolidity/syntaxTests/constructor/constructor_visibility.sol index f2ebd21d2..9213f4189 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_visibility.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_visibility.sol @@ -1,5 +1,5 @@ // The constructor of a base class should not be visible in the derived class -contract A { constructor(string memory) public { } } +contract A { constructor(string memory) { } } contract B is A { function f() pure public { A x = A(0); // convert from address @@ -9,5 +9,5 @@ contract B is A { } } // ---- -// TypeError 3656: (131-301): Contract "B" should be marked as abstract. -// TypeError 9640: (250-254): Explicit type conversion not allowed from "string memory" to "contract A". +// TypeError 3656: (124-294): Contract "B" should be marked as abstract. +// TypeError 9640: (243-247): Explicit type conversion not allowed from "string memory" to "contract A". diff --git a/test/libsolidity/syntaxTests/constructor/constructor_without_implementation.sol b/test/libsolidity/syntaxTests/constructor/constructor_without_implementation.sol index 0d65fe984..869cc18ad 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_without_implementation.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_without_implementation.sol @@ -1,5 +1,5 @@ contract C { - constructor() public; + constructor(); } // ---- -// TypeError 5700: (14-35): Constructor must be implemented if declared. +// TypeError 5700: (14-28): Constructor must be implemented if declared. diff --git a/test/libsolidity/syntaxTests/constructor/external_constructor.sol b/test/libsolidity/syntaxTests/constructor/external_constructor.sol index d3f21b8fa..5f1f92684 100644 --- a/test/libsolidity/syntaxTests/constructor/external_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/external_constructor.sol @@ -2,4 +2,4 @@ contract test { constructor() external {} } // ---- -// TypeError 9239: (17-42): Constructor must be public or internal. +// SyntaxError 2462: (17-42): Visibility specified for constructor. If you want the contract to be non-deployable, make it "abstract". diff --git a/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol b/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol index e6a2ca3be..ae0815ec6 100644 --- a/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/function_named_constructor.sol @@ -1,5 +1,5 @@ contract C { - function constructor() public; + function constructor(); } // ---- // ParserError 3323: (26-37): This function is named "constructor" but is not the constructor of the contract. If you intend this to be a constructor, use "constructor(...) { ... }" without the "function" keyword to define it. diff --git a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor.sol b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor.sol index 1c03e249b..461857ff1 100644 --- a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor.sol @@ -1,8 +1,8 @@ -contract C { - constructor() internal {} +abstract contract C { + constructor() {} } contract D { function f() public { C c = new C(); c; } } // ---- -// TypeError 9054: (84-89): Contract with internal constructor cannot be created directly. +// TypeError 4614: (84-89): Cannot instantiate an abstract contract. diff --git a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol index 76ba97663..f947ed675 100644 --- a/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol +++ b/test/libsolidity/syntaxTests/constructor/inconstructible_internal_constructor_inverted.sol @@ -2,12 +2,12 @@ // "new A". contract B { A a; - constructor() public { + constructor() { a = new A(address(this)); } } -contract A { - constructor(address) internal {} +abstract contract A { + constructor(address) {} } // ---- -// TypeError 9054: (141-146): Contract with internal constructor cannot be created directly. +// TypeError 4614: (134-139): Cannot instantiate an abstract contract. diff --git a/test/libsolidity/syntaxTests/constructor/interface_constructor.sol b/test/libsolidity/syntaxTests/constructor/interface_constructor.sol index 864e4e6d2..bbdab25a6 100644 --- a/test/libsolidity/syntaxTests/constructor/interface_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/interface_constructor.sol @@ -1,7 +1,6 @@ interface I { - constructor() public; + constructor(); } // ---- -// TypeError 1560: (15-36): Functions in interfaces must be declared external. -// TypeError 6482: (15-36): Constructor cannot be defined in interfaces. -// TypeError 5700: (15-36): Constructor must be implemented if declared. +// TypeError 6482: (15-29): Constructor cannot be defined in interfaces. +// TypeError 5700: (15-29): Constructor must be implemented if declared. diff --git a/test/libsolidity/syntaxTests/constructor/library_constructor.sol b/test/libsolidity/syntaxTests/constructor/library_constructor.sol index 230b144f5..bd1fa9550 100644 --- a/test/libsolidity/syntaxTests/constructor/library_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/library_constructor.sol @@ -1,6 +1,6 @@ library Lib { - constructor() public; + constructor(); } // ---- -// TypeError 7634: (15-36): Constructor cannot be defined in libraries. -// TypeError 5700: (15-36): Constructor must be implemented if declared. +// TypeError 7634: (15-29): Constructor cannot be defined in libraries. +// TypeError 5700: (15-29): Constructor must be implemented if declared. diff --git a/test/libsolidity/syntaxTests/constructor/nonpayable_new.sol b/test/libsolidity/syntaxTests/constructor/nonpayable_new.sol index fa94ee4e5..cb1923c1f 100644 --- a/test/libsolidity/syntaxTests/constructor/nonpayable_new.sol +++ b/test/libsolidity/syntaxTests/constructor/nonpayable_new.sol @@ -1,12 +1,12 @@ -contract A1 { constructor() public {} } +contract A1 { constructor() {} } contract B1 is A1 {} -contract A2 { constructor() public payable {} } +contract A2 { constructor() payable {} } contract B2 is A2 {} contract B3 {} -contract B4 { constructor() public {} } +contract B4 { constructor() {} } contract C { function f() public payable { @@ -17,7 +17,7 @@ contract C { } } // ---- -// TypeError 7006: (235-252): Cannot set option "value", since the constructor of contract B1 is not payable. -// TypeError 7006: (258-275): Cannot set option "value", since the constructor of contract B2 is not payable. -// TypeError 7006: (281-298): Cannot set option "value", since the constructor of contract B3 is not payable. -// TypeError 7006: (304-321): Cannot set option "value", since the constructor of contract B4 is not payable. +// TypeError 7006: (214-231): Cannot set option "value", since the constructor of contract B1 is not payable. +// TypeError 7006: (237-254): Cannot set option "value", since the constructor of contract B2 is not payable. +// TypeError 7006: (260-277): Cannot set option "value", since the constructor of contract B3 is not payable. +// TypeError 7006: (283-300): Cannot set option "value", since the constructor of contract B4 is not payable. diff --git a/test/libsolidity/syntaxTests/constructor/payable_new.sol b/test/libsolidity/syntaxTests/constructor/payable_new.sol index fb8e9ef53..350956a4c 100644 --- a/test/libsolidity/syntaxTests/constructor/payable_new.sol +++ b/test/libsolidity/syntaxTests/constructor/payable_new.sol @@ -1,10 +1,10 @@ contract A1 {} -contract B1 is A1 { constructor() public payable {} } +contract B1 is A1 { constructor() payable {} } -contract A2 { constructor() public {} } -contract B2 is A2 { constructor() public payable {} } +contract A2 { constructor() {} } +contract B2 is A2 { constructor() payable {} } -contract B3 { constructor() public payable {} } +contract B3 { constructor() payable {} } contract C { function f() public payable { diff --git a/test/libsolidity/syntaxTests/constructor/returns_in_constructor.sol b/test/libsolidity/syntaxTests/constructor/returns_in_constructor.sol index 20920dea7..c3eea9ea8 100644 --- a/test/libsolidity/syntaxTests/constructor/returns_in_constructor.sol +++ b/test/libsolidity/syntaxTests/constructor/returns_in_constructor.sol @@ -1,5 +1,5 @@ contract test { - constructor() public returns (uint a) { } + constructor() returns (uint a) { } } // ---- -// TypeError 9712: (46-54): Non-empty "returns" directive for constructor. +// TypeError 9712: (39-47): Non-empty "returns" directive for constructor. diff --git a/test/libsolidity/syntaxTests/constructor/two_constructors.sol b/test/libsolidity/syntaxTests/constructor/two_constructors.sol index d44124d38..6cd7abf73 100644 --- a/test/libsolidity/syntaxTests/constructor/two_constructors.sol +++ b/test/libsolidity/syntaxTests/constructor/two_constructors.sol @@ -1,6 +1,6 @@ contract test { - constructor(uint) public { } - constructor() public {} + constructor(uint) { } + constructor() {} } // ---- -// DeclarationError 7997: (47-70): More than one constructor defined. +// DeclarationError 7997: (40-56): More than one constructor defined. diff --git a/test/libsolidity/syntaxTests/constructor_this.sol b/test/libsolidity/syntaxTests/constructor_this.sol index 7d18407dc..3740cf867 100644 --- a/test/libsolidity/syntaxTests/constructor_this.sol +++ b/test/libsolidity/syntaxTests/constructor_this.sol @@ -1,6 +1,6 @@ contract C { function f() public pure {} - constructor() public { + constructor() { C c = this; c.f(); // this does not warn now, but should warn in the future this.f(); @@ -8,5 +8,5 @@ contract C { } } // ---- -// Warning 5805: (172-176): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. -// Warning 5805: (191-195): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. +// Warning 5805: (165-169): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. +// Warning 5805: (184-188): "this" used in constructor. Note that external functions of a contract cannot be called while it is being constructed. diff --git a/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions.sol b/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions.sol index 5f961fbb9..173bfc545 100644 --- a/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions.sol +++ b/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions.sol @@ -1,4 +1,4 @@ -contract D { constructor() public payable {} } +contract D { constructor() payable {} } contract C { function foo() pure internal { new D{salt:"abc", value:3}; diff --git a/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions_unsupported.sol b/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions_unsupported.sol index 5fd802c0a..89ec2b110 100644 --- a/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions_unsupported.sol +++ b/test/libsolidity/syntaxTests/functionCalls/new_with_calloptions_unsupported.sol @@ -1,4 +1,4 @@ -contract D { constructor() public payable {} } +contract D { constructor() payable {} } contract C { function foo() pure internal { new D{salt:"abc", value:3}; @@ -10,6 +10,6 @@ contract C { // ==== // EVMVersion: