bug fix #609
This commit is contained in:
parent
924a625e45
commit
07097940a7
21
TestSuite/abstract2.pas
Normal file
21
TestSuite/abstract2.pas
Normal 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.
|
||||||
|
|
@ -2677,7 +2677,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
continue;
|
continue;
|
||||||
fn = si.sym_info as function_node;
|
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;
|
common_method_node fn_common = fn as common_method_node;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue