Skip to content

Conversation

@dzhu
Copy link

@dzhu dzhu commented Jan 4, 2020

I had some code, something like the sample below, that was incorrectly triggering the "unused import" warning:

-- A.elm
module A exposing (A(..))

type A =
    A Int

-- B.elm
module B

import A

x =
    \(A.A _) -> 0

This PR fixes that case and several other ones where imported modules are only used in patterns. I tested by updating my code for each case and testing that the warning disappeared when I added the checking code to handle that case (and by adding new tests that failed with the old code but pass with the new code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant