From 19f6b5ad05a20800babca49bfea25d3fadf46906 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Fri, 6 Jul 2018 19:42:44 +0200 Subject: Updates interface constructor and function type test. --- .../syntaxTests/constructor/interface_constructor_new.sol | 8 ++++---- .../syntaxTests/constructor/interface_constructor_old.sol | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'test/libsolidity/syntaxTests/constructor') diff --git a/test/libsolidity/syntaxTests/constructor/interface_constructor_new.sol b/test/libsolidity/syntaxTests/constructor/interface_constructor_new.sol index 6efdea46..2cab1851 100644 --- a/test/libsolidity/syntaxTests/constructor/interface_constructor_new.sol +++ b/test/libsolidity/syntaxTests/constructor/interface_constructor_new.sol @@ -1,7 +1,7 @@ interface I { - constructor() external; + constructor() public; } // ---- -// TypeError: (15-38): Constructor must be public or internal. -// TypeError: (15-38): Constructor cannot be defined in interfaces. -// TypeError: (15-38): Constructor must be implemented if declared. +// Warning: (15-36): Functions in interfaces should be declared external. +// TypeError: (15-36): Constructor cannot be defined in interfaces. +// TypeError: (15-36): Constructor must be implemented if declared. diff --git a/test/libsolidity/syntaxTests/constructor/interface_constructor_old.sol b/test/libsolidity/syntaxTests/constructor/interface_constructor_old.sol index 449d3f1b..313d4345 100644 --- a/test/libsolidity/syntaxTests/constructor/interface_constructor_old.sol +++ b/test/libsolidity/syntaxTests/constructor/interface_constructor_old.sol @@ -1,8 +1,8 @@ interface I { - function I() external; + function I() public; } // ---- -// Warning: (15-37): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead. -// TypeError: (15-37): Constructor must be public or internal. -// TypeError: (15-37): Constructor cannot be defined in interfaces. -// TypeError: (15-37): Constructor must be implemented if declared. +// Warning: (15-35): Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead. +// Warning: (15-35): Functions in interfaces should be declared external. +// TypeError: (15-35): Constructor cannot be defined in interfaces. +// TypeError: (15-35): Constructor must be implemented if declared. -- cgit v1.2.3