Ifdef conditional define ignored

Hi,

this gives an error, but should’t (as it should be equivalent to the next (commented) line).

Type “PCallStruct” cannot be used as an argument type for public global method “DoCall”, because it is not public

namespace CallStub;

interface

{ $define extvis}

type
  TCallStruct={$ifdef extvis} public {$endif} record
  {$ifdef extvis}
  public
  {$endif}
  end;
  PCallStruct=^TCallStruct;

procedure DoCall(par:PCallStruct); {$ifdef extvis} public; {$endif} empty; // works not
//procedure DoCall(par:PCallStruct); empty; // works

implementation

end.

Logged as bugs://E27455.

reproduced.