mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
Fixed crash when looking for contextual inherited JSDocs for setters and getters (#60027)
Co-authored-by: Gabriela Araujo Britto <garaujobritto@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e962037df3
commit
413f0fa831
@@ -735,6 +735,8 @@ class SymbolObject implements Symbol {
|
||||
if (context) {
|
||||
if (isGetAccessor(context)) {
|
||||
if (!this.contextualGetAccessorDocumentationComment) {
|
||||
this.contextualGetAccessorDocumentationComment = emptyArray; // Set temporarily to avoid an infinite loop finding inherited tags
|
||||
|
||||
this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker);
|
||||
}
|
||||
if (length(this.contextualGetAccessorDocumentationComment)) {
|
||||
@@ -743,6 +745,8 @@ class SymbolObject implements Symbol {
|
||||
}
|
||||
if (isSetAccessor(context)) {
|
||||
if (!this.contextualSetAccessorDocumentationComment) {
|
||||
this.contextualSetAccessorDocumentationComment = emptyArray; // Set temporarily to avoid an infinite loop finding inherited tags
|
||||
|
||||
this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker);
|
||||
}
|
||||
if (length(this.contextualSetAccessorDocumentationComment)) {
|
||||
@@ -766,6 +770,8 @@ class SymbolObject implements Symbol {
|
||||
if (context) {
|
||||
if (isGetAccessor(context)) {
|
||||
if (!this.contextualGetAccessorTags) {
|
||||
this.contextualGetAccessorTags = emptyArray; // Set temporarily to avoid an infinite loop finding inherited tags
|
||||
|
||||
this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker);
|
||||
}
|
||||
if (length(this.contextualGetAccessorTags)) {
|
||||
@@ -774,6 +780,8 @@ class SymbolObject implements Symbol {
|
||||
}
|
||||
if (isSetAccessor(context)) {
|
||||
if (!this.contextualSetAccessorTags) {
|
||||
this.contextualSetAccessorTags = emptyArray; // Set temporarily to avoid an infinite loop finding inherited tags
|
||||
|
||||
this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker);
|
||||
}
|
||||
if (length(this.contextualSetAccessorTags)) {
|
||||
|
||||
Reference in New Issue
Block a user