parse_structs_10.sol 871 B

123456789101112131415161718192021222324252627282930313233
  1. contract con {
  2. struct C {
  3. uint256 val;
  4. B b;
  5. }
  6. struct D {
  7. C c;
  8. }
  9. struct B {
  10. D d;
  11. }
  12. struct A {
  13. D d;
  14. B b;
  15. C c;
  16. }
  17. }
  18. // ---- Expect: diagnostics ----
  19. // error: 2:18-21: contract name 'con' is reserved file name on Windows
  20. // error: 3:20-21: struct 'C' has infinite size
  21. // note 5:17-20: recursive field 'b'
  22. // error: 8:20-21: struct 'D' has infinite size
  23. // note 9:17-20: recursive field 'c'
  24. // error: 12:20-21: struct 'B' has infinite size
  25. // note 13:17-20: recursive field 'd'
  26. // error: 16:20-21: struct 'A' has infinite size
  27. // note 17:17-20: recursive field 'd'
  28. // note 18:17-20: recursive field 'b'
  29. // note 19:17-20: recursive field 'c'