aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityNameAndTypeResolution.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-03-15 02:25:16 +0800
committerchriseth <c@ethdev.com>2017-03-15 02:25:16 +0800
commit9f328ff749477106a569e679e5eeed5c7e78d29d (patch)
tree4ed950ef68eb3e0b4a0810f80b3951124d9ee6d7 /test/libsolidity/SolidityNameAndTypeResolution.cpp
parentc65d50681117edb96f6b1387f5a88de160811d38 (diff)
downloaddexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar.gz
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar.bz2
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar.lz
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar.xz
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.tar.zst
dexon-solidity-9f328ff749477106a569e679e5eeed5c7e78d29d.zip
Turn non-constant constants error into warning.
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp6
1 files changed, 4 insertions, 2 deletions
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)