Now, if that code is inside a bool function (i.e. a function that returns a bool), then I'm hoping there's another 'return' after that code (at the very least as a sanity test).
If it's outputting the text (either "True" or "False") but not returning then TBH you've found a compiler bug, that pretty much shouldn't happen at all! So it's probably not what's happened and you may not be detecting what it returns properly, where's the code that makes you think it's not returning properly?