Skip to content

Commit 5c99c67

Browse files
committed
1 parent b7b43fe commit 5c99c67

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/compiler/checker.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3951,7 +3951,12 @@ namespace ts {
39513951
writePunctuation(writer, SyntaxKind.CloseBracketToken);
39523952
writePunctuation(writer, SyntaxKind.ColonToken);
39533953
writeSpace(writer);
3954-
buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
3954+
if (info.type) {
3955+
buildTypeDisplay(info.type, writer, enclosingDeclaration, globalFlags, symbolStack);
3956+
}
3957+
else {
3958+
writeKeyword(writer, SyntaxKind.AnyKeyword);
3959+
}
39553960
writePunctuation(writer, SyntaxKind.SemicolonToken);
39563961
writer.writeLine();
39573962
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// @noImplicitAny: true
4+
//// function f(y, z = { p: y[
5+
6+
verify.getAndApplyCodeFix();

0 commit comments

Comments
 (0)