immutable_04.sol 282 B

123456789101112
  1. contract x {
  2. int public immutable y;
  3. function foo() public {
  4. int a;
  5. (y, a) = (1, 2);
  6. }
  7. }
  8. // ---- Expect: diagnostics ----
  9. // error: 7:18-19: cannot assign to immutable 'y' outside of constructor