thaddy <thaddy@localhost> schrieb am Di., 30. Juli 2019, 10:04: > On 2019-07-30 01:43, J. Gareth Moreton wrote: > > As someone on the issue pointed out... on page 2, section 3.1: > > > > 3.1 Error > > > I have added this to the bug report. Consider that here all possible > case labels are implemented, the compiler still throws a compile time > error. > That means the implementation is wrong anyway. > > {$mode ISO} > program isobug(infile,outfile); > type > operator = (plus, minus, times); > var > x:integer; > o:operator = plus; > begin > x:=1; > case o of > plus : x := x; // all > minus : x := x; // possible > times : x := x; // cases > end; > end. > > The easy way out seems to revert to the 3.0.4 implementation given the > section mentioned. > Gareth's suggestion would be nice to have, though.
That's definitely a bug, cause the same code (with "operator" changed to "op") compiles in mode ObjFPC without any warning or error. Regards, Sven >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel