Properly treat MemberExpressions in patterns

This commit is contained in:
Tony Garnock-Jones 2018-11-05 13:57:05 +00:00
parent 54adb879dc
commit ecf80bdb7d
1 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,8 @@ function compilePattern(state, patternPath) {
if (!isLiteral(pattern)) {
console.error('Unsupported pattern node type', pattern);
}
// FALL THROUGH
case 'MemberExpression':
pushConstant(pattern);
return [t.nullLiteral(), pattern];
}