IEnumerable<T> in .NET 3.5 is not covariant
This commit is contained in:
parent
1020033096
commit
f063557b7b
|
@ -392,7 +392,11 @@ namespace Antlr4.Runtime.Atn
|
|||
Collections.EmptyList<PrecedencePredicate>();
|
||||
|
||||
List<PrecedencePredicate> result = collection.OfType<PrecedencePredicate>().ToList();
|
||||
#if NET_4_0
|
||||
collection.ExceptWith(result);
|
||||
#else
|
||||
collection.ExceptWith(result.Cast<SemanticContext>());
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue