diff options
-rw-r--r-- | compiler/GHC/Driver/Make.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/src/src.hs | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index 0d1cf892bd..999bed68b5 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -347,7 +347,7 @@ warnMissingHomeModules dflags targets mod_graph = TargetFile target_file _ | Just mod_file <- ml_hs_file (ms_location mod) -> - target_file == mod_file || + augmentByWorkingDirectory dflags target_file == mod_file || -- Don't warn on B.hs-boot if B.hs is specified (#16551) addBootSuffix target_file == mod_file || diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T index 5a799ab885..9fe8b99787 100644 --- a/testsuite/tests/warnings/should_compile/all.T +++ b/testsuite/tests/warnings/should_compile/all.T @@ -55,3 +55,4 @@ test('T18862b', normal, compile, ['']) test('T20312', normal, compile,['-Wall']) test('T22151', normal, compile, ['-Wredundant-constraints']) test('T22759', normal, compile, ['']) +test('T22676', [extra_files(['src'])], multimod_compile, ['src.hs', '-working-dir src -Wmissing-home-modules -v0']) diff --git a/testsuite/tests/warnings/should_compile/src/src.hs b/testsuite/tests/warnings/should_compile/src/src.hs new file mode 100644 index 0000000000..918e213f57 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/src/src.hs @@ -0,0 +1,3 @@ +module Main where + +main = print () |