Not sure what this example is trying to show: It will assert on success, and succeed if an exception is thrown... Maybe you wanted:

```D
if ( ! "x".to!int().ifThrown(false) )
```

?

That said, in this case, one would really just use `assertNotThrown`. That, or use my void suggestion of:

```D
int a;
(a = "x".to!int()).ifThrown(assert(0)));
```