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

Decorators from an exported class are attached to a nested class instead. #259

Closed
achicu opened this issue Dec 15, 2016 · 0 comments · Fixed by #358
Closed

Decorators from an exported class are attached to a nested class instead. #259

achicu opened this issue Dec 15, 2016 · 0 comments · Fixed by #358

Comments

@achicu
Copy link

achicu commented Dec 15, 2016

Decorators from an exported class are attached to a nested class instead.
https://github.com/achicu/babel-decorator-bug

Input Code

@ParentDecorator
export default class ParentClass {
    makeNestedClass() {
        class NestedClass {
        }
    }
}

Babylon/Babel Configuration

{
  "plugins": ["transform-decorators-legacy"]
}

Expected Behavior

The ParentDecorator should be attached to the ParentClass.

Current Behavior

The ParentDecorator is attached to the NestedClass.

Your Environment

software version
Babylon 6.14.1
node v5.10.1
npm 3.8.3
Operating System macOS 10.11.6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants