Skip to content

Commit

Permalink
Variable misuse ML model found a bug where wrong variable is used to … (
Browse files Browse the repository at this point in the history
#23437)

* Variable misuse ML model found a bug where wrong variable is used to call a method.

* more variable misusage cases
  • Loading branch information
heejaechang committed Nov 29, 2017
1 parent 7692269 commit f212118
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Expand Up @@ -362,7 +362,7 @@ private string GetTestOutputFilePath(string filepath)

try
{
outputFilePath = Path.GetDirectoryName(_filePath);
outputFilePath = Path.GetDirectoryName(filepath);
}
catch (ArgumentException)
{
Expand Down
Expand Up @@ -162,7 +162,7 @@ protected LinePosition GetTrackingLineColumn(Workspace workspace, DocumentId doc
}

var currentSnapshot = textBuffer.CurrentSnapshot;
return GetLinePosition(snapshot, trackingPoint);
return GetLinePosition(currentSnapshot, trackingPoint);
}

private LinePosition GetLinePosition(ITextSnapshot snapshot, ITrackingPoint trackingPoint)
Expand Down
Expand Up @@ -87,8 +87,6 @@ internal static partial class ISymbolExtensions
Contract.Requires(within is INamedTypeSymbol || within is IAssemblySymbol);

failedThroughTypeCheck = false;
var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly;

switch (symbol.Kind)
{
case SymbolKind.Alias:
Expand Down

0 comments on commit f212118

Please sign in to comment.