ghcide/test
Jacek Generowicz 87f449d2c5 Fix #237 (#243)
The bug was caused by broken transitivity of the comparison function used to
sort spans. Nested spans were meant to be sorted in innermost-first order, with
the first (innermost) one being used to get type information about the symbol at
a given position.

Because the comparison function considered any two non-nested spans to be EQ,
the sort could incorrectly conclude (by transitivity) that two nested spans were
equal, and thus leave them in incorrect relative order. This resulted in the
innermost span sometimes not appearing at the front of the list of spans which
enclose a given point, and hover reporting the type of a bigger expression in
which the point appeared.

The solution imposes ordering on non-nested spans by comparing their starting
positions, thus fixing transitivity.

Fixes #237 (... probably along with a bunch of other little bugs caused by the
same mistake).
2019-12-14 21:08:03 +01:00
..
cabal/Development/IDE/Test Enable more warnings for the ghcide codebase (#75) 2019-09-17 08:50:20 +02:00
data Tests for issue #237 (#238) 2019-12-13 14:07:51 +01:00
exe Fix #237 (#243) 2019-12-14 21:08:03 +01:00
manual/lhs added unlit stage for literate Haskell source files 2019-09-11 11:56:26 +02:00
src/Development/IDE ghcide: make tests fail on unexpected diagnostic messages (#2813) (#2823) 2019-09-10 15:01:33 +02:00