From fc78b32847ce462bbcc443bbf269a1bdd8bcc99e Mon Sep 17 00:00:00 2001 From: Chase McDermott Date: Wed, 11 Jul 2018 20:24:50 -0500 Subject: Added default data locations to parameters for syntax tests. --- .../syntaxTests/constructor/constructor_visibility_new.sol | 4 ++-- .../syntaxTests/constructor/constructor_visibility_old.sol | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test/libsolidity/syntaxTests/constructor') diff --git a/test/libsolidity/syntaxTests/constructor/constructor_visibility_new.sol b/test/libsolidity/syntaxTests/constructor/constructor_visibility_new.sol index 502dc029..f9c4b9b9 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_visibility_new.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_visibility_new.sol @@ -1,5 +1,5 @@ // The constructor of a base class should not be visible in the derived class -contract A { constructor(string) public { } } +contract A { constructor(string memory) public { } } contract B is A { function f() pure public { A x = A(0); // convert from address @@ -9,4 +9,4 @@ contract B is A { } } // ---- -// TypeError: (243-247): Explicit type conversion not allowed from "string memory" to "contract A". +// TypeError: (250-254): Explicit type conversion not allowed from "string memory" to "contract A". diff --git a/test/libsolidity/syntaxTests/constructor/constructor_visibility_old.sol b/test/libsolidity/syntaxTests/constructor/constructor_visibility_old.sol index 847ea27b..65f989b0 100644 --- a/test/libsolidity/syntaxTests/constructor/constructor_visibility_old.sol +++ b/test/libsolidity/syntaxTests/constructor/constructor_visibility_old.sol @@ -1,5 +1,5 @@ // The constructor of a base class should not be visible in the derived class -contract A { function A(string s) public { } } +contract A { function A(string memory s) public { } } contract B is A { function f() pure public { A x = A(0); // convert from address @@ -9,5 +9,5 @@ contract B is A { } } // ---- -// Warning: (91-122): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead. -// TypeError: (244-248): Explicit type conversion not allowed from "string memory" to "contract A". +// Warning: (91-129): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead. +// TypeError: (251-255): Explicit type conversion not allowed from "string memory" to "contract A". -- cgit v1.2.3