PropertyDefinitionEvaluation for static MethodDefinition

# Yusuke SUZUKI (9 years ago)

Seeing the ES6 specification, I've found that PropertyDefinitionEvaluation for static MethodDefinition is missing.

For example, In ClassDefinitionEvaluation's step 21.a, we applied IsStatic semantics to ClassElement m, and IsStatic has the definition for static MethodDefinition correctly. After that, we applied PropertyDefinitionEvaluation semantics to the same ClassElement m, but there's no definition in PropertyDefinitionEvaluation for static MethodDefinition.

Is that correct? And I'd like to make sure that static Method doesn't have the [[Construct]] (functionKind becomes "Method").

Best , Yusuke Suzuki

# Allen Wirfs-Brock (9 years ago)

On Jul 22, 2015, at 9:38 AM, Yusuke SUZUKI wrote:

Hi forks,

Seeing the ES6 specification, I've found that PropertyDefinitionEvaluation for static MethodDefinition is missing.

For example, In ClassDefinitionEvaluation's step 21.a, we applied IsStatic semantics to ClassElement m, and IsStatic has the definition for static MethodDefinition correctly. After that, we applied PropertyDefinitionEvaluation semantics to the same ClassElement m, but there's no definition in PropertyDefinitionEvaluation for static MethodDefinition.

Is that correct?

static method ClassElement is defined via a "chain production" (www.ecma-international.org/ecma-262/6.0/#sec-algorithm-conventions ):

ClassElement : static MethodDefinition

so the definition of PropertyDefinitionEvaluation for MethodDefinition is used (www.ecma-international.org/ecma-262/6.0/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation )

And I'd like to make sure that static Method doesn't have the [[Construct]] (functionKind becomes "Method").

Yes.

PropertyDefinitionEvaluation for concise methods calls DefineMethod with only one argument. Taht results in DefineMethod calling FunctionCreate with Method as its kind argument

# Yusuke SUZUKI (9 years ago)

On Wed, Jul 22, 2015 at 10:06 AM, Allen Wirfs-Brock <allen at wirfs-brock.com>

wrote:

On Jul 22, 2015, at 9:38 AM, Yusuke SUZUKI wrote:

Hi forks,

Seeing the ES6 specification, I've found that PropertyDefinitionEvaluation for static MethodDefinition is missing.

For example, In ClassDefinitionEvaluation's step 21.a, we applied IsStatic semantics to ClassElement m, and IsStatic has the definition for static MethodDefinition correctly. After that, we applied PropertyDefinitionEvaluation semantics to the same ClassElement m, but there's no definition in PropertyDefinitionEvaluation for static MethodDefinition.

Is that correct?

static method ClassElement is defined via a "chain production" ( www.ecma-international.org/ecma-262/6.0/#sec-algorithm-conventions ):

ClassElement : static MethodDefinition

so the definition of PropertyDefinitionEvaluation for MethodDefinition is used ( www.ecma-international.org/ecma-262/6.0/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation )

Oops, sorry. I've overlooked this. Thank you.

And I'd like to make sure that static Method doesn't have the [[Construct]] (functionKind becomes "Method").

Yes.

PropertyDefinitionEvaluation for concise methods calls DefineMethod with only one argument. Taht results in DefineMethod calling FunctionCreate with Method as its kind argument

allen

Make sense.

Best , Yusuke Suzuki