From 9f328ff749477106a569e679e5eeed5c7e78d29d Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 14 Mar 2017 19:25:16 +0100 Subject: Turn non-constant constants error into warning. --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/libsolidity') diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 71fef32d..27791775 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -2180,7 +2180,8 @@ BOOST_AUTO_TEST_CASE(assigning_state_to_const_variable) address constant x = msg.sender; } )"; - CHECK_ERROR(text, TypeError, "Initial value for constant variable has to be compile-time constant."); + // Change to TypeError for 0.5.0. + CHECK_WARNING(text, "Initial value for constant variable has to be compile-time constant."); } BOOST_AUTO_TEST_CASE(constant_string_literal_disallows_assignment) @@ -2207,7 +2208,8 @@ BOOST_AUTO_TEST_CASE(assign_constant_function_value_to_constant) uint constant y = x(); } )"; - CHECK_ERROR(text, TypeError, "Initial value for constant variable has to be compile-time constant."); + // Change to TypeError for 0.5.0. + CHECK_WARNING(text, "Initial value for constant variable has to be compile-time constant."); } BOOST_AUTO_TEST_CASE(assignment_to_const_var_involving_conversion) -- cgit