Skip to content

Conversation

AdrienBoulanger
Copy link
Contributor

@AdrienBoulanger AdrienBoulanger commented Oct 2, 2020

Better handling to navigate between the declaration/body/ref
when the profiles are slightly different (common case:
the user is modifying the spec profile and then wants to
navigate to the body)

Add a test.

@AdrienBoulanger AdrienBoulanger force-pushed the topic/T812-022.imprecise.fallback branch 3 times, most recently from f76e339 to f9ed45c Compare October 14, 2020 09:48
Better handling to navigate between the declaration/body/ref when the prototype are slightly differents (the common case is when the user is modifying the declaration and then when to do the same with the body) Add a test. Adapt existing tests to the new results found by the Imprecise Fallback.
@AdrienBoulanger AdrienBoulanger force-pushed the topic/T812-022.imprecise.fallback branch from f9ed45c to b610c63 Compare October 20, 2020 08:40
else -- If we are on a defining_name already
Other_Part := Laltools.Common.Find_Next_Part
(Definition, Self.Trace);
(Definition, Self.Trace, Imprecise_Fallback => True);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the fact that the user gets warned when the results are not precise.

I suggest doing the following:

  • call Find_Next_Part with Imprecise_Fallback => False
  • if Other_Part = No_Defining_Name, set the boolean Imprecise to True and re-try Find_Next_Part with Imprecise_Fallback => True
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will be slower: it is not recommended to call Find_Next_Part 2 times. Furthermore I would like to remove this Imprecise warning altogether.

-- No next part is found. Check first defining name
Other_Part := Laltools.Common.Find_Canonical_Part
(Definition, Self.Trace);
(Definition, Self.Trace, Imprecise_Fallback => True);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark as above: add a 2-step mechanism to make sure we set Imprecise when Imprecise_Fallback is needed.

@AdrienBoulanger AdrienBoulanger deleted the topic/T812-022.imprecise.fallback branch March 18, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants