Should I remove it then? I've added this `static if` for robustness. It's true path will be chosen in two unlikely cases - when `errorHandler` is boolean and `expression` is either:
1. `null.ifThrown...`. I see no reason to use this, because null can never throw.
2. `foo().ifThrown...` when foo is declared `typeof(null) foo()`. Again, I see no reason to declare a function like this.
The case when the second `static if`'s true path will be chosen is also unlikely: when `expression` is boolean and `errorHandler` is null. This is unlikely because if you want to handle the exception thrown from a boolean `expression` - you probably want to return a boolean in the `errorHandler` as well.

However, even though users of `ifThrown` have no reason to use in in one of those scenarios, I can see how D's heavy usage of type inference and template metaprogramming can cause them.

Since you already made a pull request to fixed it, it's safe to assume it'll be fixed in the next release of dmd. Since this is the first time I've contributed to a standard library I need to ask - is it safe to assume the next release of Phobos will not come before the next release to dmd? If so, I'll remove those `static if`s.