address_cast.sol 305 B

1234567891011
  1. contract c {
  2. function foo() public {
  3. // We have code that cast address type to ref address
  4. // in fn sema::cast(). Ensure that this does not cause
  5. // address values to be assignable.
  6. address(0) = tx.program_id;
  7. }
  8. }
  9. // ---- Expect: diagnostics ----
  10. // error: 6:3-13: expression is not assignable