@@ -173,13 +173,14 @@ type internal FilePairMap(files: FileInProject array) =
173173 |> Option.map ( fun ( implFile : FileInProject ) -> ( sigFile.Idx, implFile.Idx)))
174174 |> Array.choose id
175175
176- let goodPairs , wrongOrderPairs =
176+ let goodPairs , misorderedPairs =
177177 pairs |> Array.partition ( fun ( sigIdx , implIdx ) -> sigIdx < implIdx)
178178
179179 let sigToImpl , implToSig = buildBiDirectionalMaps goodPairs
180180
181- // Pairs where the signature file comes after the implementation file in the project order. We need to track them to report such errors.
182- let wrongOrder = wrongOrderPairs |> Map.ofArray
181+ // Pairs where the signature file comes after the implementation file in the project order.
182+ // We need to track them to report FS0238 (implementation already given).
183+ let misordered = misorderedPairs |> Map.ofArray
183184
184185 member x.GetSignatureIndex ( implementationIndex : FileIndex ) = Map.find implementationIndex implToSig
185186 member x.GetImplementationIndex ( signatureIndex : FileIndex ) = Map.find signatureIndex sigToImpl
@@ -195,7 +196,8 @@ type internal FilePairMap(files: FileInProject array) =
195196
196197 member x.IsSignature ( index : FileIndex ) = Map.containsKey index sigToImpl
197198
198- member x.TryGetWrongOrderSignatureToImplementationIndex ( index : FileIndex ) = wrongOrder |> Map.tryFind index
199+ member x.TryGetOutOfOrderImplementationIndex ( signatureIndex : FileIndex ) =
200+ misordered |> Map.tryFind signatureIndex
199201
200202/// Callback that returns a previously calculated 'Result and updates 'State accordingly.
201203type internal Finisher < 'Node , 'State , 'Result > = Finisher of node : 'Node * finisher : ( 'State -> 'Result * 'State )
0 commit comments