📜 ⬆️ ⬇️

True or False or False = False

image An interesting and exciting bug was found today in Delphi XE5 and published by the owner of g + community Delphi Developers, Lars Fosdal.

Under some conditions, True or False or False is calculated in False, while (True or False or False) is calculated to the expected True.
The comments also notice that there was a case when x: = True or True or True also gave False.

Bug floating, and after cleaning and rebuilding the project from scratch, he passed.

Below, under the spoiler, are screenshots of the discussion.
Screenshots
image
image

')
I strongly recommend that all XE5 users cover even the most obvious places with unit tests.

Source: https://habr.com/ru/post/213733/


All Articles