{: test that using a bound id as a var parameter causes
   a compilation error }

{$d+}
program e111( output );

type
   smallInt =  1..10;

var
   a : array['1'..'9'] of integer;

procedure p1(c :  char );
begin
   if c = '5' then writeln('OK');
end; { p1 }

procedure p2(var c :  char );
begin
   c := '5';
end; { p2 }

procedure test(aa: array[lo..hi :char ] of integer);
var
   aa1 : array[smallInt] of integer;
   z   : char;
begin
   z := lo;
   aa[z] := 3;
   p1(lo);   { ok }
   p2(lo);   { !!! boundid is a var parameter }
   aa[lo] := 3;

   writeln( 'fails: conformant array bounds assign is not detected' );
end;
begin {e111}

   test(a);

end. { e111 }

