Test that it's possible to write "impl of B for A" outside a class, where A is a class type. This didn't require any extra work, but it's still good to have a regression test. Closes #2287