-
Notifications
You must be signed in to change notification settings - Fork 96
Tests for issue 310 (misleading hover on inner signature) #311
Conversation
The most important pair of tests here is the "inner signature" pair. The others serve mainly to document, compare and contrast what is happening in related situations. In summary, hover and gotoDef + on inner signatures: give type and location information for the outer definition; this is misleading, + on outer signatures: give no information at all, + on inner definitions: give correct information for the inner definition, + on outer definitions: give correct information for the outer definition. Should hover and gotoDef do anything at all for signatures? or is the current behaviour for outer signatures (doing nothing at all) what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these tests.
I'd agree that hover/gotoDef on the signature should point to their corresponding definition (i.e. outer->outer and inner->inner).
Which leaves one small detail: what exactly do we mean by "pont to their definition"? Should it point to
? |
Right, thanks for pointing that out. In other instances "gotoDef" does (2). In a snippet like the following (2) also seems more useful.
So, to me (2) seems like the better option. |
Agreed. I'll adjust the tests to reflect this choice. |
Done. I'm not sure whether it is worth keeping the tests which compare the (working) definition behaviour to the (broken) signature behaviour, so I have added a separate commit which removes the definition tests: we can keep or revert this commit depending on how we feel about those tests. |
Thanks! Happy to remove the tests since as you pointed out they are somewhat redundant. |
* Tests for issue 310 (misleading hover on inner signature) The most important pair of tests here is the "inner signature" pair. The others serve mainly to document, compare and contrast what is happening in related situations. In summary, hover and gotoDef + on inner signatures: give type and location information for the outer definition; this is misleading, + on outer signatures: give no information at all, + on inner definitions: give correct information for the inner definition, + on outer definitions: give correct information for the outer definition. Should hover and gotoDef do anything at all for signatures? or is the current behaviour for outer signatures (doing nothing at all) what we want? * Require signature hover/gotoDef to point to first clause of definition * Remove perhaps superfluous tests for definitions
…cide#311) * Tests for issue 310 (misleading hover on inner signature) The most important pair of tests here is the "inner signature" pair. The others serve mainly to document, compare and contrast what is happening in related situations. In summary, hover and gotoDef + on inner signatures: give type and location information for the outer definition; this is misleading, + on outer signatures: give no information at all, + on inner definitions: give correct information for the inner definition, + on outer definitions: give correct information for the outer definition. Should hover and gotoDef do anything at all for signatures? or is the current behaviour for outer signatures (doing nothing at all) what we want? * Require signature hover/gotoDef to point to first clause of definition * Remove perhaps superfluous tests for definitions
…cide#311) * Tests for issue 310 (misleading hover on inner signature) The most important pair of tests here is the "inner signature" pair. The others serve mainly to document, compare and contrast what is happening in related situations. In summary, hover and gotoDef + on inner signatures: give type and location information for the outer definition; this is misleading, + on outer signatures: give no information at all, + on inner definitions: give correct information for the inner definition, + on outer definitions: give correct information for the outer definition. Should hover and gotoDef do anything at all for signatures? or is the current behaviour for outer signatures (doing nothing at all) what we want? * Require signature hover/gotoDef to point to first clause of definition * Remove perhaps superfluous tests for definitions
…cide#311) * Tests for issue 310 (misleading hover on inner signature) The most important pair of tests here is the "inner signature" pair. The others serve mainly to document, compare and contrast what is happening in related situations. In summary, hover and gotoDef + on inner signatures: give type and location information for the outer definition; this is misleading, + on outer signatures: give no information at all, + on inner definitions: give correct information for the inner definition, + on outer definitions: give correct information for the outer definition. Should hover and gotoDef do anything at all for signatures? or is the current behaviour for outer signatures (doing nothing at all) what we want? * Require signature hover/gotoDef to point to first clause of definition * Remove perhaps superfluous tests for definitions
Tests for #310.
The most important pair of tests here is the "inner signature" pair. The others
serve mainly to document, compare and contrast what is happening in related
situations.
In summary, hover and gotoDef
on inner signatures: give type and location information for the outer
definition; this is misleading,
on outer signatures: give no information at all,
on inner definitions: give correct information for the inner definition,
on outer definitions: give correct information for the outer definition.
Should hover and gotoDef do anything at all for signatures? or is the current
behaviour for outer signatures (doing nothing at all) what we want?