Skip to content

Commit cde06b6

Browse files
committed
Fix #7397: Remove error checks for noEmit and out* compiler options combined.
1 parent a75a02c commit cde06b6

13 files changed

+73
-18
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,24 +1746,7 @@ namespace ts {
17461746
}
17471747
}
17481748

1749-
if (options.noEmit) {
1750-
if (options.out) {
1751-
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "out"));
1752-
}
1753-
1754-
if (options.outFile) {
1755-
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outFile"));
1756-
}
1757-
1758-
if (options.outDir) {
1759-
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outDir"));
1760-
}
1761-
1762-
if (options.declaration) {
1763-
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration"));
1764-
}
1765-
}
1766-
else if (options.allowJs && options.declaration) {
1749+
if (options.allowJs && options.declaration) {
17671750
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"));
17681751
}
17691752

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : Symbol(c, Decl(a.ts, 0, 0))
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : c
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : Symbol(c, Decl(a.ts, 0, 0))
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : c
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : Symbol(c, Decl(a.ts, 0, 0))
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : c
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : Symbol(c, Decl(a.ts, 0, 0))
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/a.ts ===
2+
3+
class c {
4+
>c : c
5+
}
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @declaration: true
2+
// @noEmit: true
3+
// @fileName: a.ts
4+
5+
class c {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @out: outDir
2+
// @noEmit: true
3+
// @fileName: a.ts
4+
5+
class c {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @outDir: outDir
2+
// @noEmit: true
3+
// @fileName: a.ts
4+
5+
class c {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// @outFile: a.js
2+
// @noEmit: true
3+
// @fileName: a.ts
4+
5+
class c {
6+
}

0 commit comments

Comments
 (0)