<p>I'm checking out the Delphi 2009 Trial, but run into problems with the generics stuff right away.</p>

<p>The following code does not compile, and I haven't the slightest idea why it's giving me E2015 for the Equals() method:</p>

<pre><code>type
  TPrimaryKey&lt;T&gt; = class(TObject)
  strict private
    fValue: T;
  public
    constructor Create(AValue: T);
    function Equals(Obj: TObject): boolean; override;
    function GetValue: T;
  end;

constructor TPrimaryKey&lt;T&gt;.Create(AValue: T);
begin
  inherited Create;
  fValue := AValue;
end;

function TPrimaryKey&lt;T&gt;.Equals(Obj: TObject): boolean;
begin
  Result := (Obj &lt;&gt; nil) and (Obj is TPrimaryKey&lt;T&gt;)
    and (TPrimaryKey&lt;T&gt;(Obj).GetValue = fValue);
end;

function TPrimaryKey&lt;T&gt;.GetValue: T;
begin
  Result := fValue;
end;
</code></pre>

<p>Why does the compiler think that fValue and the result of GetValue() can not be compared?</p>

You can't use operators with untyped generics. See
here
for a discussion.
It compiles if you change it to:
```
```
TPrimaryKey<T: class> = class(TObject)
```
```