t_bad_fwd.mod 348 B

123456789101112
  1. MODULE TBadFwd;
  2. // A forward module-level variable assigned an incompatible value: the
  3. // parser cannot check it (the type is unknown when the assignment is
  4. // parsed), so the resolve pass must. Expects "incompatible assignment".
  5. VAR ExitCode : INTEGER;
  6. PROCEDURE P;
  7. BEGIN n := "abc" END P;
  8. VAR n : INTEGER;
  9. BEGIN P; ExitCode := 0 END TBadFwd.