blob: 2f1aff04cb88dfb026cdf96e1078aa31169b8259 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{ %fail }
{ This should not be allowed, it creates an infinite loop.
The loop can be solved using word() typecasts. But it is
to dangerous code to be allowed }
operator := (b:byte) l:longint;
begin
if b=0 then
l:=-1
else
l:=0;
end;
var
l : longint;
b : byte;
begin
b:=0;
l:=b;
writeln(l);
end.
|