[Git][ghc/ghc][wip/T23025] WIP: fix another bug

Krzysztof Gogolewski (@monoidal) gitlab at gitlab.haskell.org
Mon Apr 24 10:09:23 UTC 2023



Krzysztof Gogolewski pushed to branch wip/T23025 at Glasgow Haskell Compiler / GHC


Commits:
3e1f1f48 by Krzysztof Gogolewski at 2023-04-24T12:09:03+02:00
WIP: fix another bug

- - - - -


2 changed files:

- compiler/GHC/Core/Lint.hs
- testsuite/tests/linear/should_compile/all.T


Changes:

=====================================
compiler/GHC/Core/Lint.hs
=====================================
@@ -1491,6 +1491,7 @@ lintCaseExpr scrut var alt_ty alts =
        -- See GHC.Core Note [Case expression invariants] item (7)
 
      ; lintBinder CaseBind var $ \_ ->
+       addAliasUE var scrut_ue $
        do { -- Check the alternatives
           ; let extra_ue = scaleUE scrut_mult scrut_ue
           ; alt_ues <- mapM (lintCoreAlt var scrut_ty scrut_mult alt_ty extra_ue) alts


=====================================
testsuite/tests/linear/should_compile/all.T
=====================================
@@ -40,4 +40,4 @@ test('T18731', normal, compile, [''])
 test('T19400', unless(compiler_debugged(), skip), compile, [''])
 test('T20023', normal, compile, [''])
 test('T22546', normal, compile, [''])
-test('T23025', normal, compile, [''])
+test('T23025', normal, compile, ['-dlinear-core-lint'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3e1f1f48465052d8b9eccc36d917305338030531

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3e1f1f48465052d8b9eccc36d917305338030531
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230424/d79533c2/attachment.html>


More information about the ghc-commits mailing list