{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2700","labels_url":"https://api.github.com/repos/babel/babel/issues/2700/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2700/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2700/events","html_url":"https://github.com/babel/babel/issues/2700","id":114399449,"number":2700,"title":"Class extends does not work in babel 6","user":{"login":"KnisterPeter","id":327445,"avatar_url":"https://avatars.githubusercontent.com/u/327445?v=3","gravatar_id":"","url":"https://api.github.com/users/KnisterPeter","html_url":"https://github.com/KnisterPeter","followers_url":"https://api.github.com/users/KnisterPeter/followers","following_url":"https://api.github.com/users/KnisterPeter/following{/other_user}","gists_url":"https://api.github.com/users/KnisterPeter/gists{/gist_id}","starred_url":"https://api.github.com/users/KnisterPeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnisterPeter/subscriptions","organizations_url":"https://api.github.com/users/KnisterPeter/orgs","repos_url":"https://api.github.com/users/KnisterPeter/repos","events_url":"https://api.github.com/users/KnisterPeter/events{/privacy}","received_events_url":"https://api.github.com/users/KnisterPeter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/babel/babel/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/babel/babel/labels/confirmed","name":"confirmed","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-10-31T09:08:25Z","updated_at":"2015-11-03T15:45:26Z","closed_at":"2015-11-03T03:31:10Z","body":"The following code does not compile with babel 6 but throws an error (which is not very informative):\r\n\r\n```javascript\r\nclass Expression {}\r\n\r\nexport class ArrayExpression extends Expression {\r\n}   \r\n```\r\n\r\n```\r\n~/source/ankara (master)$ ./node_modules/.bin/babel test.js \r\nError: test.js: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\r\n    at NodePath.insertAfter (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/modification.js:181:13)\r\n    at NodePath.replaceWithMultiple (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/replacement.js:92:8)\r\n    at handleClassWithSuper (/home/markusw/source/ankara/node_modules/babel-preset-stage-1/node_modules/babel-plugin-transform-class-constructor-call/lib/index.js:80:10)\r\n    at PluginPass.Class (/home/markusw/source/ankara/node_modules/babel-preset-stage-1/node_modules/babel-plugin-transform-class-constructor-call/lib/index.js:101:11)\r\n    at newFn (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/visitors.js:233:27)\r\n    at NodePath._call (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:72:18)\r\n    at NodePath.call (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:44:17)\r\n    at NodePath.visit (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:102:12)\r\n    at TraversalContext.visitQueue (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:151:16)\r\n    at TraversalContext.visitSingle (/home/markusw/source/ankara/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:111:19)\r\n```\r\n\r\nMy .babel.rc contains the following:\r\n```\r\n{\r\n  \"presets\": [\"stage-1\"],\r\n  \"plugins\": [\"transform-async-to-generator\"]\r\n}\r\n```\r\n\r\nThe following snippet does work:\r\n```javascript\r\nclass Expression {}\r\n\r\nexport class ArrayExpression {\r\n}   \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/153394064","html_url":"https://github.com/babel/babel/issues/2700#issuecomment-153394064","issue_url":"https://api.github.com/repos/babel/babel/issues/2700","id":153394064,"user":{"login":"mattstyles","id":1760429,"avatar_url":"https://avatars.githubusercontent.com/u/1760429?v=3","gravatar_id":"","url":"https://api.github.com/users/mattstyles","html_url":"https://github.com/mattstyles","followers_url":"https://api.github.com/users/mattstyles/followers","following_url":"https://api.github.com/users/mattstyles/following{/other_user}","gists_url":"https://api.github.com/users/mattstyles/gists{/gist_id}","starred_url":"https://api.github.com/users/mattstyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattstyles/subscriptions","organizations_url":"https://api.github.com/users/mattstyles/orgs","repos_url":"https://api.github.com/users/mattstyles/repos","events_url":"https://api.github.com/users/mattstyles/events{/privacy}","received_events_url":"https://api.github.com/users/mattstyles/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T15:45:26Z","updated_at":"2015-11-03T15:45:26Z","body":"For what it worth, `export` or `export default` makes no difference\r\n\r\n```\r\nexport class Foo {\r\n  static bar: 'bar'\r\n}\r\n```\r\n"}}