Disallow duplicated decorated methods#86
Merged
littledan merged 1 commit intotc39:masterfrom Apr 17, 2018
Merged
Conversation
littledan
approved these changes
Apr 3, 2018
Member
littledan
left a comment
There was a problem hiding this comment.
Thanks for this very clean specification of the semantics we discussed. Personally, this seems like a good approach to me, but I'd like to have feedback from other decorators co-champions first.
Member
|
We discussed this change with other decorator co-champions and decided it made sense. We might come back and weaken this, but honestly, any code which hits this runtime error is probably already buggy. |
Member
|
Nicolo, could you rebase this patch and resolve conflicts? |
4f95c9b to
a504e2f
Compare
a504e2f to
ddd3920
Compare
Member
Author
|
Rebased |
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jun 6, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jun 8, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jul 1, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jul 3, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jul 10, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Jul 28, 2018
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Aug 17, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#84
This proposed patch disallows code where the decorator isn't applied to the function it's written before of, but to the last
methodfunction, which can be very confusing:I didn't change the behavior of get/set pairs since this should still be possible: