Bug in PersistentDictionary Linq

Nov 19, 2010 at 11:46 AM

Hello,

There is a bug in linq Last() method (haven't checked others).

The following test is failing: 

using (var persistentDictionary = CloneDictionary(this.testDictionary1))
{
      var expected = this.testDictionary1.Last();
      var actual = persistentDictionary.Last();
      Assert.AreEqual(expected, actual);
}

However, this is passing:
using (var persistentDictionary = CloneDictionary(this.testDictionary1))
{
      var expected = this.testDictionary1.Last(x => true);
      var actual = persistentDictionary.Last(x => true);
      Assert.AreEqual(expected, actual);
}


Nov 23, 2010 at 7:50 PM

Thanks for reporting this. I've fixed the bug (and added new tests) in change 57996.