fix #2012
This commit is contained in:
parent
9a026595ec
commit
27a1546e8a
|
|
@ -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();
|
||||
|
|
|
|||
5
TestSuite/units/u_overloads3.pas
Normal file
5
TestSuite/units/u_overloads3.pas
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
unit u_overloads3;
|
||||
function f(a: integer) := int64(20);
|
||||
|
||||
begin
|
||||
end.
|
||||
7
TestSuite/usesunits/use_overloads3.pas
Normal file
7
TestSuite/usesunits/use_overloads3.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
uses u_overloads3;
|
||||
function f(a: integer): integer := 10;
|
||||
|
||||
begin
|
||||
var r := f(0);
|
||||
assert(r = 10);
|
||||
end.
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue