pascalabcnet/TestSuite/errors/err0548_delegates25.pas
Mikhalkovich Stanislav 4cec1e7c43 fix #3299
Revert incorrect pr intellisense
2025-07-13 13:13:29 +03:00

23 lines
327 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var i: integer;
procedure p0(p: byte->());
begin
p(1);
Inc(i);
end;
type
t1 = class
static procedure p1<T>(o: T) := exit;
procedure p2<T>(o: T) := exit;
end;
begin
// OK
p0(t1.p1&<byte>);
p0(t1.Create.p2&<byte>);
// А эти 2 падают
p0(t1.p1);
p0(t1.Create.p2);
assert(i = 4);
end.