{: test that constant expression type error causes a compilation error }

program e1051( output );

type
   colour = ( black, brown, red, orange, yellow, green, blue, violet, grey, white);

const
   ac0 =  red + 3;
   ac1 =  red - 3;
   ac2 =  red div 3;
   ac3 =  red mod 3;
   ac4 =  red * 3;

   ac5 =  3 + red;
   ac6 =  3 - red;
   ac7 =  3 div red;
   ac8 =  3 mod red;
   ac9 =  3 * red;

   c1 = pred(red); {!!! arg must be an integer}
   c2 = succ(red); {!!! arg must be an integer}
   c3 = odd(red); {!!! arg must be an integer}
   c4 = abs(red); {!!! arg must be an integer}
   c5 = sqr(red); {!!! arg must be an integer}
   c8 = chr(red); {!!! arg must be an integer}
   c9 = -(red);   {!!! arg must be an integer}
   c0 = +(red);   {!!! arg must be an integer}
   ca = -red;     {!!! arg must be an integer}
   cb = +red;     {!!! arg must be an integer}


var
   e : colour;
   n : integer;
   s : packed array[1..20] of char;

begin { e1051 }

   e := black;
   n := 2;

   writeln( 'constant expression type error not detected' );
end. { e1051 }

