On 30.12.2016 11:27, Jonas Maebe wrote:
Yes, this is by design. The above code is invalid and relies on implementation details to work. E.g. with a JVM or CIL backend, the code would be rejected by the bytecode verifier too.

Thank you Jonas for clarification. It may be worth to document it - neither {$OBJECTCHECKS } nor -CR tell about cast checking.

http://www.freepascal.org/docs-html/3.0.0/prog/progsu57.html#x64-630001.2.57
http://www.freepascal.org/docs-html/3.0.0/user/userap1.html

Ondrej
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to