summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0143.pp
blob: 099a7ded30a9b99a0d855c0c4ed66713edcd1232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{ Old file: tbs0171.pp }
{ missing typecasting in constant expression solved for pointers                                   OK 0.99.11 (PM) }

type
  pstring=^string;
const
  drivestr:string='c:';
  pdrivestr:pstring=pstring(@drivestr);
begin
  if pdrivestr^<>'c:' then
    begin
       Writeln('Error in typecast of const');
       Halt(1);
    end;
end.