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

program e1054( output );

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

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

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

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

   cc = trunc(6.04);  {!!! trunc not supported in const expressions}

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

begin { e1054 }

   e := black;
   n := 2;

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

