Fix conversion from bool to floating point value
Summary: Due to the definition of how floating point values convert to boolean, the check for undefined behaviour wouldn't work correctly. The result of (1 - 0.9999999999999999) would yield 0 when converted to an integer, but yields true (1) when converted to a boolean. As all floating point values can thus be converted to boolean without triggering undefined behaviour, this change overloads checkConversion() appropriately Reviewed By: yfeldblum Differential Revision: D3477368 fbshipit-source-id: 5b2aeb6194629cf3a6195529aac2362c0d35799c
Showing
Please register or sign in to comment