diff options
Turn non-constant constants error into warning.
Diffstat (limited to 'libsolidity/analysis/TypeChecker.cpp')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 41636db7..8e7ec29b 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -484,9 +484,10 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) if (!_variable.value()) typeError(_variable.location(), "Uninitialized \"constant\" variable."); else if (!_variable.value()->annotation().isPure) - typeError( + warning( _variable.value()->location(), - "Initial value for constant variable has to be compile-time constant." + "Initial value for constant variable has to be compile-time constant. " + "This will fail to compile with the next breaking version change." ); } if (!_variable.isStateVariable()) |