Skip to content
Permalink
Browse files

Fix corner case: formulas with no refs like '=1+1'

  • Loading branch information...
dbarowy committed Mar 3, 2019
1 parent 20c6963 commit 4e15ef2b87fc861d2522e851c5cc78a4a7078936
Showing with 10 additions and 3 deletions.
  1. +10 −3 FastDependenceAnalysis/Graph.cs
@@ -1019,10 +1019,17 @@ public HashSet<AST.Address> getFormulaSingleCellInputs(AST.Address addr)
if (d.OnSheet)
{
var key = new Tuple<int,int>(d.Row, d.Col);
foreach (Reference d2 in _referenceTable[key])

// formulas of the form =1 + 1 are indeed formulas,
// but they have no references, so don't bother looking
// in this case.
if (_referenceTable.ContainsKey(key))
{
var addr2 = ValueReferenceToAddress(d2.Row, d2.Col);
output.Add(addr2);
foreach (Reference d2 in _referenceTable[key])
{
var addr2 = ValueReferenceToAddress(d2.Row, d2.Col);
output.Add(addr2);
}
}
}

0 comments on commit 4e15ef2

Please sign in to comment.
You can’t perform that action at this time.