This commit is contained in:
Бондарев Иван 2018-08-07 21:23:13 +02:00
parent e4abab739c
commit 6191c3333f
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,10 @@
type
MyException=class(Exception)
constructor :=
create('Some text');
end;
begin
var ex := new MyException;
assert(ex.Message = 'Some text');
end.

View file

@ -4962,6 +4962,12 @@ namespace PascalABCCompiler.TreeConverter
{
sil = context.converted_namespace.find(id.name);
}
if (sil != null && id.name.ToLower() == "create" && context.converted_type != null && sil.FirstOrDefault().sym_info is common_method_node && (sil.FirstOrDefault().sym_info as common_method_node).is_constructor)
{
List<SymbolInfo> base_si_list = context.converted_type.base_type.find(id.name);
if (base_si_list != null)
sil.AddRange(base_si_list);
}
}
}