Skip to content

Don't error on duplicate prototype property assignments#7268

Merged
RyanCavanaugh merged 2 commits into
microsoft:release-1.8from
RyanCavanaugh:fix7063
Mar 1, 2016
Merged

Don't error on duplicate prototype property assignments#7268
RyanCavanaugh merged 2 commits into
microsoft:release-1.8from
RyanCavanaugh:fix7063

Conversation

@RyanCavanaugh

Copy link
Copy Markdown
Member

Fixes #7063

Comment thread src/compiler/binder.ts

// Declare the method/property
declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, SymbolFlags.Property, SymbolFlags.PropertyExcludes);
declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, SymbolFlags.Property, SymbolFlags.PropertyExcludes & ~SymbolFlags.Property);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adapt the above comment:

// It's acceptable for multiple 'Foo.prototype' assignments of the same prototype to occur

or something like that

@mhegazy

mhegazy commented Feb 26, 2016

Copy link
Copy Markdown
Contributor

👍

@@ -0,0 +1,28 @@
///<reference path="fourslash.ts" />

// @allowNonTsExtensions: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not think you needed the fourslash test here. a compiler baseline test would have been more appropriate.

@billti

billti commented Feb 26, 2016

Copy link
Copy Markdown
Member

👍

@DanielRosenwasser

Copy link
Copy Markdown
Member

Ping - can you address the comments and merge this in @RyanCavanaugh?

RyanCavanaugh added a commit that referenced this pull request Mar 1, 2016
Don't error on duplicate prototype property assignments
@RyanCavanaugh RyanCavanaugh merged commit a264cea into microsoft:release-1.8 Mar 1, 2016
@RyanCavanaugh RyanCavanaugh deleted the fix7063 branch March 1, 2016 21:57
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants