Revert "Propagate expected type to if"

This reverts commit 1900a8b1470a329526ddcd7e3a76d9a98126ce7d.
Merge branch 'master' into locking