diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 933381afa92..43feb6008cf 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1465,7 +1465,7 @@ namespace 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); } function bindCallExpression(node: CallExpression) { diff --git a/tests/cases/fourslash/jsDocClasses1.ts b/tests/cases/fourslash/jsDocClasses1.ts new file mode 100644 index 00000000000..c68afa0e14b --- /dev/null +++ b/tests/cases/fourslash/jsDocClasses1.ts @@ -0,0 +1,28 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: Foo.js + +//// function fn() { +//// this.foo = 10; +//// } +//// fn.prototype.foo = 14; +//// var x = new fn(); +//// +//// function fn2() { +//// this.foo = 10; +//// this.foo = 10; +//// } +//// fn2.prototype.foo = 14; +//// fn2.prototype.foo = 14; +//// var y = new fn2(); +//// +//// function fn3() { +//// this.foo = 10; +//// } +//// fn3.prototype.foo = 14; +//// fn3.prototype.foo = 14; +//// var z = new fn3(); + +verify.numberOfErrorsInCurrentFile(0); +