Skip to content

Commit e986ad6

Browse files
committed
As part of incremental type checking, when filtering out potentially unwanted parser errors, don't ignore the multiple definitions type error
1 parent 1bf87b3 commit e986ad6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/src/incrementalCompilation.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,13 @@ async function compileContents(
677677
.filter((d) => {
678678
if (
679679
!d.message.startsWith("Uninterpreted extension 'rescript.") &&
680-
!d.message.includes(
681-
`/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}`
680+
(
681+
!d.message.includes(
682+
`/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}`
683+
) ||
684+
// The `Multiple definition of the <kind> name <name>` type error's
685+
// message includes the filepath with LOC of the duplicate definition
686+
d.message.includes("Multiple definition of the")
682687
)
683688
) {
684689
hasIgnoredErrorMessages = true;

0 commit comments

Comments
 (0)