fix typo in cases pattern number error, and test case for getting variant bindings