type t1 = class where T: t1; function p1: T; begin var a: t1; var b := a as T; end; end; begin end.