{: test a compilation error occurs for a bad type declaration }

{$d+}
program e018( output );

type t1 t2 = integer;  { !!! bad type declaration }

var
   i : integer;
   r : record
          case boolean of
            true : (ma, mb : array[1..10] of real);
            false: (mx     : array[1..10] of real);
       end;
begin {e018}

   for i := 1 to 10 do r.ma[i] := i+9;
   r.mb := r.ma;  {OK}

   writeln( 'fails: type declaration error not detected' );

end. {e018}

