Allow reading of immutables during construction time

This commit is contained in:
Marenz
2021-08-19 13:59:05 +02:00
committed by chriseth
parent 729db521a9
commit 121fd40f74
40 changed files with 233 additions and 55 deletions
@@ -0,0 +1,7 @@
contract D {
uint immutable t;
modifier m(uint) { _; }
constructor() m(t=2) {}
}
// ----
// TypeError 1581: (77-78): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.