[Git][ghc/ghc][wip/sjakobi/regression-tests-3] Add regression test for #11505
Simon Jakobi pushed to branch wip/sjakobi/regression-tests-3 at Glasgow Haskell Compiler / GHC Commits: f2cd5ef1 by Simon Jakobi at 2026-03-06T16:35:56+01:00 Add regression test for #11505 Closes #11505. - - - - - 4 changed files: - + testsuite/tests/typecheck/should_compile/T11505Bar.hs - + testsuite/tests/typecheck/should_compile/T11505Foo.hs - + testsuite/tests/typecheck/should_compile/T11505Foo.hs-boot - testsuite/tests/typecheck/should_compile/all.T Changes: ===================================== testsuite/tests/typecheck/should_compile/T11505Bar.hs ===================================== @@ -0,0 +1,3 @@ +module T11505Bar where + +import {-# SOURCE #-} T11505Foo ===================================== testsuite/tests/typecheck/should_compile/T11505Foo.hs ===================================== @@ -0,0 +1,12 @@ +module T11505Foo where + +import T11505Bar + +-- #11505: this used to fail with: +-- +-- T11505Foo.hs:12:1: +-- Type constructor `Foo' has conflicting definitions in the module +-- and its hs-boot file +-- Main module: data Foo = Foo {x :: {-# UNPACK #-} !Int} +-- Boot file: data Foo = Foo {x :: !Int} +data Foo = Foo { x :: {-# UNPACK #-} !Int } ===================================== testsuite/tests/typecheck/should_compile/T11505Foo.hs-boot ===================================== @@ -0,0 +1,3 @@ +module T11505Foo where + +data Foo = Foo { x :: {-# UNPACK #-} !Int } ===================================== testsuite/tests/typecheck/should_compile/all.T ===================================== @@ -818,6 +818,7 @@ test('T20356', normal, compile, ['']) test('T20584', normal, compile, ['']) test('T21558', normal, compile, ['-w']) test('T20584b', normal, compile, ['']) +test('T11505', [extra_files(['T11505Foo.hs', 'T11505Foo.hs-boot', 'T11505Bar.hs'])], multimod_compile, ['T11505Foo', '-v0']) test('T20588b', [extra_files(['T20588b.hs', 'T20588b.hs-boot', 'T20588b_aux.hs'])], multimod_compile, ['T20588b_aux.hs', '-v0']) test('T20588d', [extra_files(['T20588d.hs', 'T20588d.hs-boot', 'T20588d_aux.hs'])], multimod_compile, ['T20588d_aux.hs', '-v0']) test('T20661', [extra_files(['T20661.hs', 'T20661.hs-boot', 'T20661_aux.hs'])], multimod_compile, ['T20661_aux.hs', '-v0']) @@ -963,4 +964,3 @@ test('T26746', normal, compile, ['']) test('T26737', normal, compile, ['']) test('T26805a', normal, compile, ['']) test('T24464', normal, compile, ['']) - View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2cd5ef13fd9693ee1b553d18d8c8d85... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2cd5ef13fd9693ee1b553d18d8c8d85... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)