aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/constructor
diff options
context:
space:
mode:
authorChase McDermott <chasemcd1745@tamu.edu>2018-07-12 09:24:50 +0800
committerChase McDermott <chasemcd1745@tamu.edu>2018-07-12 09:24:50 +0800
commitfc78b32847ce462bbcc443bbf269a1bdd8bcc99e (patch)
tree54ac5642482c44be352ea327f1f833edf3232d18 /test/libsolidity/syntaxTests/constructor
parent71777ce729d9cf2a536fe966de6c6dd1ee43c807 (diff)
downloaddexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar.gz
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar.bz2
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar.lz
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar.xz
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.tar.zst
dexon-solidity-fc78b32847ce462bbcc443bbf269a1bdd8bcc99e.zip
Added default data locations to parameters for syntax tests.
Diffstat (limited to 'test/libsolidity/syntaxTests/constructor')
-rw-r--r--test/libsolidity/syntaxTests/constructor/constructor_visibility_new.sol4
-rw-r--r--test/libsolidity/syntaxTests/constructor/constructor_visibility_old.sol6
2 files changed, 5 insertions, 5 deletions
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".