mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-07 18:25:51 -05:00
Fixes #20542
This commit is contained in:
@@ -3951,7 +3951,12 @@ namespace ts {
|
||||
writePunctuation(writer, SyntaxKind.CloseBracketToken);
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
|
||||
if (info.type) {
|
||||
buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
|
||||
}
|
||||
else {
|
||||
writeKeyword(writer, SyntaxKind.AnyKeyword);
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.SemicolonToken);
|
||||
writer.writeLine();
|
||||
}
|
||||
|
||||
6
tests/cases/fourslash/typeToStringCrashInCodeFix.ts
Normal file
6
tests/cases/fourslash/typeToStringCrashInCodeFix.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @noImplicitAny: true
|
||||
//// function f(y, z = { p: y[
|
||||
|
||||
verify.getAndApplyCodeFix();
|
||||
Reference in New Issue
Block a user