bug0060.pp 510 B

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