using_import.sol 321 B

123456789101112131415
  1. import "./simple.sol" as simpels;
  2. function dec(simpels.S s) pure { s.f1 -= 1; }
  3. using {dec} for simpels.S;
  4. contract c {
  5. function test(simpels.S s) public {
  6. s.inc();
  7. s.dec();
  8. }
  9. }
  10. // ---- Expect: diagnostics ----
  11. // warning: 7:2-35: function can be declared 'pure'
  12. // warning: 3:7-8: error 'E' has never been used