Only allow compile-time constants for constant state variables.

This commit is contained in:
chriseth
2018-07-03 23:03:26 +02:00
parent 533d5d4b1c
commit 8ed3da1d5f
4 changed files with 7 additions and 15 deletions
@@ -3,4 +3,4 @@ contract C {
uint constant y = x();
}
// ----
// Warning: (74-77): Initial value for constant variable has to be compile-time constant. This will fail to compile with the next breaking version change.
// TypeError: (74-77): Initial value for constant variable has to be compile-time constant.