Add `methodswith` for #1762.