This commit is contained in:
Sun Serega 2021-09-19 19:44:56 +03:00
parent 86398c1d5d
commit b566696cf7

View file

@ -0,0 +1,16 @@
// #2520
type
t0<T> = class
where T: Exception;
end;
//Ошибка: Невозможно инстанцировать, так как тип T не наследован от Exception
t1<T> = partial class(t0<T>)
where T: Exception;
end;
begin
new t1<System.InvalidOperationException>;
end.