New tests.

This commit is contained in:
chriseth 2020-07-06 15:47:40 +02:00
parent 5959d442cb
commit 552d353430
8 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,3 @@
abstract contract A {
constructor(function() internal) {}
}

View File

@ -0,0 +1,5 @@
contract A {
constructor(function() internal) {}
}
// ----
// TypeError 4103: (29-49): Internal type is not allowed for public or external functions. You can make the contract abstract to avoid this problem.

View File

@ -0,0 +1,6 @@
contract A {
constructor(mapping(uint => uint) memory a) {}
}
// ----
// TypeError 4103: (29-59): Types containing (nested) mappings can only be parameters or return variables of internal or library functions. You can make the contract abstract to avoid this problem.
// TypeError 4061: (29-59): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.

View File

@ -0,0 +1,5 @@
abstract contract A {
constructor(mapping(uint => uint) memory a) {}
}
// ----
// TypeError 4061: (38-68): Type mapping(uint256 => uint256) is only valid in storage because it contains a (nested) mapping.

View File

@ -0,0 +1,5 @@
contract A {
constructor(uint[] storage a) {}
}
// ----
// TypeError 3644: (29-45): This parameter has a type that can only be used internally. You can make the contract abstract to avoid this problem.

View File

@ -0,0 +1,3 @@
abstract contract A {
constructor(uint[] storage a) {}
}

View File

@ -0,0 +1,5 @@
contract C {
constructor(uint[][][] memory t) {}
}
// ----
// TypeError 4957: (26-45): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature. Alternatively, make the contract abstract and supply the constructor arguments from a derived contract.

View File

@ -0,0 +1,4 @@
abstract contract C {
constructor(uint[][][] memory t) {}
}
// ----