Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.
This repository was archived by the owner on May 19, 2018. It is now read-only.

Unable to decorate generator functions #13

@silkentrance

Description

@silkentrance

With the latest babylon@6.7.0 I am unable to decorate generator functions, i.e.

class Foo
{
    @deco
    * gen() {}
}

will result in an unexpected error.

Here, it will fail if isGenerator is true.

I am currently working on a patch for this and will report back.

RATIONALE

According to 14.3/14.4 of the ECMAScript specification, a GeneratorMethod (14.4) is a valid MethodDefinition (14.3). And in the decorator specification also states that it can be used with a MethodDefinition and makes no limitations whatsoever.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions