Skip to content

Commit 9c4e14d

Browse files
authored
Remove "No type information for this code" from baseline (#51311)
* Fix "No type information for this code" in baseline * Just remove the message
1 parent 88d25b4 commit 9c4e14d

File tree

880 files changed

+3813
-3409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

880 files changed

+3813
-3409
lines changed

src/harness/harnessIO.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -808,21 +808,14 @@ namespace Harness {
808808
typeLines += ">" + formattedLine + "\r\n";
809809
}
810810

811-
// Preserve legacy behavior
812-
if (lastIndexWritten === undefined) {
813-
for (const codeLine of codeLines) {
814-
typeLines += codeLine + "\r\nNo type information for this code.";
811+
lastIndexWritten ??= -1;
812+
if (lastIndexWritten + 1 < codeLines.length) {
813+
if (!((lastIndexWritten + 1 < codeLines.length) && (codeLines[lastIndexWritten + 1].match(/^\s*[{|}]\s*$/) || codeLines[lastIndexWritten + 1].trim() === ""))) {
814+
typeLines += "\r\n";
815815
}
816+
typeLines += codeLines.slice(lastIndexWritten + 1).join("\r\n");
816817
}
817-
else {
818-
if (lastIndexWritten + 1 < codeLines.length) {
819-
if (!((lastIndexWritten + 1 < codeLines.length) && (codeLines[lastIndexWritten + 1].match(/^\s*[{|}]\s*$/) || codeLines[lastIndexWritten + 1].trim() === ""))) {
820-
typeLines += "\r\n";
821-
}
822-
typeLines += codeLines.slice(lastIndexWritten + 1).join("\r\n");
823-
}
824-
typeLines += "\r\n";
825-
}
818+
typeLines += "\r\n";
826819
yield [checkDuplicatedFileName(unitName, dupeCase), Utils.removeTestPathPrefixes(typeLines)];
827820
}
828821
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts ===
22

3-
No type information for this code.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts ===
22

3-
No type information for this code.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
=== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts ===
2+
23
for ([""] of [[""]]) { }
3-
No type information for this code.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
=== tests/cases/compiler/InterfaceDeclaration8.ts ===
2+
23
interface string {
3-
No type information for this code.}
4-
No type information for this code.
4+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
=== tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts ===
2+
23
protected module M {
3-
No type information for this code.}
4-
No type information for this code.
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts ===
2+
23
Foo<A,B,\ C>(4, 5, 6);
3-
No type information for this code.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts ===
2+
23
"use strict";
3-
No type information for this code.let
4-
No type information for this code.
4+
let
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts ===
2+
23
const
3-
No type information for this code.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts ===
2+
23
const
3-
No type information for this code.

0 commit comments

Comments
 (0)