mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Scan types of yield expressions in classes too
Also, drop the other cases where they were ignored, since they're forbidden in enums, and the others are fine wrt the comment that was there. Fixes #34892
This commit is contained in:
@@ -1221,11 +1221,8 @@ namespace ts {
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
case SyntaxKind.TypeAliasDeclaration:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.ClassExpression:
|
||||
// These are not allowed inside a generator now, but eventually they may be allowed
|
||||
// as local types. Regardless, any yield statements contained within them should be
|
||||
// skipped in this traversal.
|
||||
// as local types. Regardless, skip them to avoid the work.
|
||||
return;
|
||||
default:
|
||||
if (isFunctionLike(node)) {
|
||||
|
||||
Reference in New Issue
Block a user