Skip to content

Commit

Permalink
private error
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jun 4, 2018
1 parent c85bd4b commit 6dd4a0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/babel-plugin-proposal-decorators/src/transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ function getSingleElementDefinition(path, superRef, classRef, file) {
const { node } = path;
const isMethod = path.isClassMethod();

if (path.isPrivate()) {
throw path.buildCodeFrameError(
`Private ${
isMethod ? "methods" : "fields"
} in decorated classes are not supported yet.`,
);
}

new ReplaceSupers(
{
methodPath: path,
Expand Down

0 comments on commit 6dd4a0f

Please sign in to comment.