тест
This commit is contained in:
parent
86398c1d5d
commit
b566696cf7
16
TestSuite/partial_2520.pas
Normal file
16
TestSuite/partial_2520.pas
Normal 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.
|
||||||
Loading…
Reference in a new issue