This commit is contained in:
Ivan Bondarev 2024-01-04 17:44:29 +01:00
parent 66ba00972f
commit 3823906c2d
3 changed files with 25 additions and 0 deletions

18
TestSuite/abstract6.pas Normal file
View file

@ -0,0 +1,18 @@
{$reference l1.dll}
type
c0 = class end;
// обязательно использовать кастомный тип в качестве типоаргумента
// с ns.c2<object> не проявляется
c3 = class(ns.c2<c0>)
procedure test;
begin
f1();
end;
end;
begin
var obj := new c3;
end.

BIN
TestSuite/l1.dll Normal file

Binary file not shown.

View file

@ -1824,6 +1824,13 @@ namespace PascalABCCompiler.TreeRealization
cmn.return_variable = (orig_fn as common_function_node)?.return_variable; cmn.return_variable = (orig_fn as common_function_node)?.return_variable;
} }
cmn.IsOperator = orig_fn.IsOperator; cmn.IsOperator = orig_fn.IsOperator;
if (orig_fn is compiled_function_node)
{
compiled_function_node fn_orig = orig_fn as compiled_function_node;
if (fn_orig.method_info.GetBaseDefinition() != null)
cmn.overrided_method = compiled_function_node.get_compiled_method(fn_orig.method_info.GetBaseDefinition());
}
return cmn; return cmn;
} }