mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-26 03:04:48 +03:00
Fix module name lookup table for pattern matching in case expressions
We were using moduleNameForType internally instead of moduleNameForValue, which only worke when the name of the custom type is the same as the name of the custom type constructor.
This commit is contained in:
parent
c2488a06b0
commit
5ebf38e283
@ -5118,7 +5118,7 @@ collectModuleNamesFromPattern context pattern =
|
|||||||
List.concatMap (collectModuleNamesFromPattern context) subPatterns
|
List.concatMap (collectModuleNamesFromPattern context) subPatterns
|
||||||
|
|
||||||
Pattern.NamedPattern { moduleName, name } subPatterns ->
|
Pattern.NamedPattern { moduleName, name } subPatterns ->
|
||||||
( Node.range pattern, moduleNameForType context name moduleName ) :: List.concatMap (collectModuleNamesFromPattern context) subPatterns
|
( Node.range pattern, moduleNameForValue context name moduleName ) :: List.concatMap (collectModuleNamesFromPattern context) subPatterns
|
||||||
|
|
||||||
Pattern.AsPattern subPattern _ ->
|
Pattern.AsPattern subPattern _ ->
|
||||||
collectModuleNamesFromPattern context subPattern
|
collectModuleNamesFromPattern context subPattern
|
||||||
|
Loading…
Reference in New Issue
Block a user