blob: 9f1ab01a719b53d6fab2a844e5d0e4a95c08ff49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ %fail }
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
type
TWrapper = record
class operator Implicit(value: Integer): TWrapper;
end;
class operator TWrapper.Implicit(value: Integer): TWrapper;
begin
end;
procedure TestProcedure(const wr: TWrapper = TWrapper(0));
{ This crashes the compiler, and shouldn’t be allowed }
begin
end;
begin
end.
|