Cherry-pick PR #34650 into release-3.7 (#34658)

Component commits:
6a6f4a666e Fix crash in assigning function with this ref to alias
This commit is contained in:
TypeScript Bot
2019-10-22 15:22:31 -07:00
committed by Nathan Shively-Sanders
parent 4b09fd707b
commit ea71ecfe22
5 changed files with 46 additions and 3 deletions
+1 -1
View File
@@ -2709,7 +2709,7 @@ namespace ts {
}
}
if (constructorSymbol) {
if (constructorSymbol && constructorSymbol.valueDeclaration) {
// Declare a 'member' if the container is an ES5 class or ES6 constructor
constructorSymbol.members = constructorSymbol.members || createSymbolTable();
// It's acceptable for multiple 'this' assignments of the same identifier to occur