facebook/esprima — pull request #49 by fkling (2014-09-25 00:46:57+00:00)
Title: Fix duplicate property error for property name literals in class definitions

Duplicate method definition detection doesn't treat string and number literal property names correctly. The following code raises a "Illegal duplicate property in class definition" error:

```
class A { 42() {} "foo"() {} }
```

This happens because we used `key.name` to get the "name" of the property name, but `.name` only exists for IdentifierName, not for StringLiteral or NumericLiteral.

This changes the code to use either `.name` or `.value` depending on the type of property name.

It also fixes another problem: `class A { foo() {} "foo"() {}}` should have thrown a duplicate property error, but it didn't.