title: How to create OleVariant compatible class in Delphi?
body: <p>Delphi 2006. XML Data Binding.
  Generate this class:</p>
  
  <pre><code>
  type
    IXMLItem = interface(IXMLNode)  
      ['{10B9A877-A975-4FC7-B9EF-448197FA1B90}']  
      { Property Accessors }
      function Get_PartNum: TPartNum_Sku;
      procedure Set_PartNum(Value: TPartNum_Sku);
      { Methods & Properties }
      property PartNum: TPartNum_Sku read Get_PartNum write Set_PartNum;
    end;
  
    { TXMLItem }
  
    TXMLItem = class(TXMLNode, IXMLItem)
    protected
      { IXMLItem }
      function Get_PartNum: TPartNum_Sku;
      procedure Set_PartNum(Value: TPartNum_Sku);
    end;
  ...
  function TXMLItem.Get_PartNum: TPartNum_Sku;
  begin
    Result := AttributeNodes['partNum'].NodeValue;
  end;
  
  procedure TXMLItem.Set_PartNum(Value: TPartNum_Sku);
  begin
    SetAttribute('partNum', Value);
  end;
  
  </pre>
  
  <p>How to create OleVariant compatible class TPartNum_Sku?
  So what would the code:</p>
  
  <pre><code>Result := AttributeNodes['partNum'].NodeValue;
  </code></pre>
  
  <p>translated without error      </p>
  
  <pre>[Pascal Error] ipo1.pas(394): E2010 Incompatible types: 'TPartNum_Sku' and 'OleVariant'
  </code></pre>