type TErr = class; TBase = abstract class public static procedure p1(temp: TErr); end; TErr = class(TBase) end; static procedure TBase.p1(temp: TErr); begin var q: TErr := new TErr; var a1: TBase := q; var a2: TBase := q as TBase; assert(a2 <> nil); q := a1 as TErr; assert(q <> nil); end; begin TBase.p1&(nil); end.