events_v0.5.sol 719 B

12345678910111213141516171819202122232425
  1. pragma solidity 0.4.12;
  2. contract A {
  3. event E(int indexed a, bool indexed b) anonymous;
  4. }
  5. contract B is A {
  6. event E(int a, bool b);
  7. function test1() public {
  8. emit E(1, true);
  9. }
  10. function test2() public {
  11. emit E({a: 1, b: true});
  12. }
  13. }
  14. // ---- Expect: diagnostics ----
  15. // warning: 11:3-18: emit can be resolved to multiple incompatible events. This is permitted in Solidity v0.5 and earlier, however it could indicate a bug.
  16. // note 8:8-9: candidate event
  17. // note 4:8-9: candidate event
  18. // warning: 15:3-26: emit can be resolved to multiple incompatible events. This is permitted in Solidity v0.5 and earlier, however it could indicate a bug.
  19. // note 8:8-9: candidate event
  20. // note 4:8-9: candidate event