global_functions_08.sol 358 B

123456789101112
  1. struct S {
  2. int32 f1;
  3. int32 f2;
  4. }
  5. function x(S storage x) view { x.f1 = 102; }
  6. // ---- Expect: diagnostics ----
  7. // warning: 7:30-31: declaration of 'x' shadows function
  8. // note 7:18-19: previous declaration of function
  9. // error: 7:42-44: function declared 'view' but this expression writes to state