Fixes #434. Before, attempting to pattern match on a list using a let-binding would crash the compiler and spit out the pattern AST. This was happening because compilePatBind' assumed the pattern would be compiled to a single JsStmt. This does not hold for list patterns.
Additionally, compilePatBind' was not generating code to throw an error if a nested irrefutable pattern match failed.
Fixes #434. Before, attempting to pattern match on a list using a let-binding would crash the compiler and spit out the pattern AST. This was happening because
compilePatBind'
assumed the pattern would be compiled to a singleJsStmt
. This does not hold for list patterns.Additionally,
compilePatBind'
was not generating code to throw an error if a nested irrefutable pattern match failed.