Browse Source

Fixed "assertion problem". Failed code was:

--------------------------------
using System;
using System.Collections.Generic;
namespace MyApp
{
public interface ISubject<T>
{
}
public class Test<T,TRight,TLeft>
{
public void Foo (IObserver<T> observer)
{
var rightSubs = new List<ISubject<TRight>> ();
var rightVals = new List<TRight> ();
Observer.Create<TLeft> (v => {
ISubject<TRight> rsub = new ReplaySubject<TRight> ();
foreach (var r }, () => sub.OnCompleted ());
}
}
}
------------------------------------
newNRvisualizers
Mike Krüger 14 years ago
parent
commit
802cd23697
  1. 3
      ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs

3
ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs

@ -176,7 +176,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
} }
// We shouldn't scan nodes that were already resolved. // We shouldn't scan nodes that were already resolved.
Debug.Assert(!resolveResultCache.ContainsKey(node)); if (!resolveResultCache.ContainsKey(node)) {
// Doing so should be harmless since we allow scanning twice, but it indicates // Doing so should be harmless since we allow scanning twice, but it indicates
// a bug in the logic that causes the scan. // a bug in the logic that causes the scan.
@ -185,6 +185,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
StoreCurrentState(node); StoreCurrentState(node);
node.AcceptVisitor(this, null); node.AcceptVisitor(this, null);
resolverEnabled = oldResolverEnabled; resolverEnabled = oldResolverEnabled;
}
break; break;
case ResolveVisitorNavigationMode.Resolve: case ResolveVisitorNavigationMode.Resolve:
Resolve(node); Resolve(node);

Loading…
Cancel
Save