This commit is contained in:
Ivan Bondarev 2021-01-24 12:21:14 +01:00
parent 9a026595ec
commit 27a1546e8a
4 changed files with 26 additions and 0 deletions

View file

@ -1620,6 +1620,11 @@ begin
var sz := Size(host.DataContext);
if sz.Width = 0 then
sz.Width := GraphWindow.Width;
if sz.Height = 0 then
sz.Height := GraphWindow.Height;
var bmp := new RenderTargetBitmap(Round(sz.Width*scalex), Round(sz.Height*scaley), dpiX, dpiY, PixelFormats.Pbgra32);
var myvis := new DrawingVisual();

View file

@ -0,0 +1,5 @@
unit u_overloads3;
function f(a: integer) := int64(20);
begin
end.

View file

@ -0,0 +1,7 @@
uses u_overloads3;
function f(a: integer): integer := 10;
begin
var r := f(0);
assert(r = 10);
end.

View file

@ -1432,6 +1432,15 @@ namespace PascalABCCompiler.TreeConverter
}
}
}
if (left_func.return_value_type != null && right_func.return_value_type != null && function_eq_params(left_func, right_func, true))
{
var tc = type_table.compare_types(left_func.return_value_type, right_func.return_value_type);
if (tc == type_compare.less_type)
return method_compare.greater_method;
if (tc == type_compare.greater_type)
return method_compare.less_method;
}
return method_compare.not_comparable_methods;
}