tb0005.pp 616 B

12345678910111213141516171819202122232425
  1. { %FAIL }
  2. { Old file: tbf0060.pp }
  3. { shows missing type checking for case statements OK 0.99.1 (CEC) }
  4. Program Test;
  5. { No errors -- problems is due to the fact that the rules for type
  6. compatibility (p.47 language guide) -- are not respected, in other words
  7. in case statements there is no type checking whatsoever in fpc!!
  8. I think that these are separate cases:
  9. 1st case) s32bit,u32bit,u8bit,s8bit,s16bit,u16bit
  10. 2nd case) uchar
  11. 3rd case) bool8bit
  12. These are not /should not be compatible with each other in a case
  13. statement imho - CEC
  14. }
  15. var
  16. myvar:char;
  17. Begin
  18. case myvar of
  19. 1: ;
  20. #2: ;
  21. end;
  22. end.