This commit is contained in:
Бондарев Иван 2017-12-13 20:42:44 +01:00
parent 924a625e45
commit 07097940a7
2 changed files with 22 additions and 1 deletions

21
TestSuite/abstract2.pas Normal file
View file

@ -0,0 +1,21 @@
type
I1 = interface
function f1: byte;
end;
AC1 = abstract class(I1)
public function f1: byte; abstract;
end;
C1 = class(AC1)
public function f1: byte; override := 1;
end;
begin
var c: I1 := new C1;
assert(c.f1=1);
end.

View file

@ -2677,7 +2677,7 @@ namespace PascalABCCompiler.TreeConverter
continue;
fn = si.sym_info as function_node;
//Сверяем параметры и тип возвращаемого значения
if (convertion_data_and_alghoritms.function_eq_params_and_result(meth, fn, true) && fn.polymorphic_state != SemanticTree.polymorphic_state.ps_virtual_abstract)
if (convertion_data_and_alghoritms.function_eq_params_and_result(meth, fn, true) /*&& fn.polymorphic_state != SemanticTree.polymorphic_state.ps_virtual_abstract*/)
{
//Нашли нужную функцию
common_method_node fn_common = fn as common_method_node;