{: test that assigning to a set outside its bounds causes a fatal error
   test bounds error at upper set boundary for vlist (with range)
}

{$d+}
program d249( output );

const
   lo  = -40;
   hi = -lo;

var
   i, j  : integer;
   s0  : set of lo..hi;    {dst}

begin {d249}

   i := hi;                  {min element of s0}

   writeln( 'INFO: s0 is [', lo:1, '..', hi:1, ']' );

   s0 := [i-1..i, i-6..i-1];      {OK}
   s0 := [i-1..i+1, i-6..i];      {!!! assignment outside bounds}

   writeln('failed to detect set assign error');

end. { d249 }

