Constructor aren't handled correctly.
JoshVarty opened this issue · 1 comments
Working at the token level has created some issues relating to constructors not linking correctly.
For example: http://sourcebrowser.io/Browse/RaYell/selenium-webdriver-extensions/src/Selenium.WebDriver.Extensions/By.cs#27
The constructor links incorrectly to: http://sourcebrowser.io/Browse/RaYell/selenium-webdriver-extensions/test/Selenium.WebDriver.Extensions.Tests/JQuerySelectorTests.cs#124
This is due to two bugs. The first is due to the following:
When traversing documents at the token level, occasionally we link to the type instead of the constructor.
For example retrieving the symbol for an ObjectExpressionSyntax like:
new JQuerySelector(selector, context, jQueryVariable)
will work correctly.
However, as we work with individual tokens, we're retrieving the symbol for the IdentifierSyntax:
JQuerySelector
which will provide a symbol that refers to the type instead of the constructor.
So in theory we should be linked to the JQuerySelector type.
We're not because of a second bug that is closely related to #57. We're not handling parameters correctly when they appear in method declarations. I'll reopen #57 and provide an explanation there.
The example at http://sourcebrowser.io/Browse/RaYell/selenium-webdriver-extensions/src/Selenium.WebDriver.Extensions/By.cs#27 reminded me of problem where non-static method usages pointed to static method declarations and vice versa. We needed to store additional boolean isStatic that helped match methods usages to appropriate methods.