Update expectations.

This commit is contained in:
chriseth 2018-04-11 17:58:53 +02:00
parent 4e1ea0866d
commit 52f68d3b63
10 changed files with 18 additions and 17 deletions

View File

@ -1,6 +1,6 @@
contract test { contract test {
function fa(bytes memory) { } function fa(bytes memory) public { }
function(bytes memory) external internal a = fa; function(bytes memory) external internal a = fa;
} }
// ---- // ----
// TypeError: (99-101): Type function (bytes memory) is not implicitly convertible to expected type function (bytes memory) external. // TypeError: (106-108): Type function (bytes memory) is not implicitly convertible to expected type function (bytes memory) external.

View File

@ -1,6 +1,7 @@
contract C { function C(uint a) public {} } contract C { constructor(uint a) public {} }
contract B is C { contract B is C {
function B() C(2) C(2) public {} constructor() C(2) C(2) public {}
} }
// ---- // ----
// DeclarationError: Base constructor already provided. // Warning: (81-85): Base constructor arguments given twice.
// DeclarationError: (86-90): Base constructor already provided.

View File

@ -1,9 +1,9 @@
// This caused a segfault in an earlier version // This caused a segfault in an earlier version
contract C { contract C {
function C() public {} constructor() public {}
} }
contract D is C { contract D is C {
function D() C(5) public {} constructor() C(5) public {}
} }
// ---- // ----
// TypeError: Wrong argument count for modifier invocation: 1 arguments given but expected 0. // TypeError: (127-131): Wrong argument count for modifier invocation: 1 arguments given but expected 0.

View File

@ -4,4 +4,4 @@ contract B {
modifier mod(uint a) { if (a > 0) _; } modifier mod(uint a) { if (a > 0) _; }
} }
// ---- // ----
// DeclarationError: Undeclared identifier. // DeclarationError: (64-65): Undeclared identifier.

View File

@ -1,5 +1,5 @@
contract A { function mod(uint a) public { } } contract A { function mod(uint a) public { } }
contract B is A { modifier mod(uint a) { _; } } contract B is A { modifier mod(uint a) { _; } }
// ---- // ----
// DeclarationError: Identifier already declared. // DeclarationError: (65-92): Identifier already declared.
// TypeError: Override changes function to modifier. // TypeError: (65-92): Override changes function to modifier.

View File

@ -1,4 +1,4 @@
contract A { modifier mod(uint a) { _; } } contract A { modifier mod(uint a) { _; } }
contract B is A { modifier mod(uint8 a) { _; } } contract B is A { modifier mod(uint8 a) { _; } }
// ---- // ----
// TypeError: Override changes modifier signature. // TypeError: (61-89): Override changes modifier signature.

View File

@ -3,4 +3,4 @@ contract B {
modifier mod1(uint a) { if (a > 0) _; } modifier mod1(uint a) { if (a > 0) _; }
} }
// ---- // ----
// TypeError: Invalid type for argument in modifier invocation. Invalid implicit conversion from bool to uint256 requested. // TypeError: (35-39): Invalid type for argument in modifier invocation. Invalid implicit conversion from bool to uint256 requested.

View File

@ -1,5 +1,5 @@
contract A { modifier mod(uint a) { _; } } contract A { modifier mod(uint a) { _; } }
contract B is A { function mod(uint a) public { } } contract B is A { function mod(uint a) public { } }
// ---- // ----
// DeclarationError: Identifier already declared. // DeclarationError: (61-92): Identifier already declared.
// TypeError: Override changes modifier to function. // TypeError: (13-40): Override changes modifier to function.

View File

@ -3,4 +3,4 @@ contract A {
modifier mod(uint a) { _; return 7; } modifier mod(uint a) { _; return 7; }
} }
// ---- // ----
// TypeError: Return arguments not allowed. // TypeError: (101-109): Return arguments not allowed.

View File

@ -2,4 +2,4 @@ contract test {
modifier m() {} modifier m() {}
} }
// ---- // ----
// SyntaxError: Modifier body does not contain '_'. // SyntaxError: (33-35): Modifier body does not contain '_'.