{: test a compilation error occurs when set elements are incompatible }

{$d+}
program e046( output );

var  s: set of char;

begin {e046}

   s := ['0'..'9', 3, 'x'];                      { !!! integer in character set }
   s := [0..'9', 'a', 'e', 'i', 'o', 'u' ];      { !!! integer in character set }
   s := ['0'..9, 'a', 'e', 'i', 'o', 'u' ];      { !!! integer in character set }
   s := ['z', 0..'9', 'a', 'e', 'i', 'o', 'u' ]; { !!! integer in character set }
   s := ['z', '0'..9, 'a', 'e', 'i', 'o', 'u' ]; { !!! integer in character set }
   s := ['0'..'9', 3, 'a'];                      { !!! integer in character set }
   s := [3, '0'..'9'];                           { !!! integer in character set }

   if '1' in ['0'.. 9, 'z'] then { !!! integer in character sets }
      writeln( 'fails: incompatible set elements not detected' );

end. {e046}
