提交 e6883bfb 编写于 作者: C chandera

If you try to GTD on a global import alias declared in a VB project file, we...

If you try to GTD on a global import alias declared in a VB project file, we null ref. This happens because the compiler synthesizes a SyntaxTree for that imports statement, but we assume that all symbols that have Locations have Locations in the current Solution. To avoid this, detect if the caret is on a alias with no locations in the solution, and in that case, GTD on the target instead. (changeset 1272875)
上级 192a1043
......@@ -13,7 +13,7 @@ public static SyntaxToken FindToken(this Location location, CancellationToken ca
return location.SourceTree.GetRoot(cancellationToken).FindToken(location.SourceSpan.Start);
}
public static bool IsVisibleSourceLocation(this Location loc, Solution solution)
public static bool IsVisibleSourceLocation(this Location loc)
{
if (!loc.IsInSource)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册