Make ErrorCollector#checkSucceeds generic