C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created.

This commit is contained in:
Calum Grant
2020-04-20 09:32:35 +01:00
committed by Tom Hvitved
parent d1cde2a815
commit cd51a67c0d
23 changed files with 59 additions and 24 deletions

View File

@@ -190,7 +190,7 @@ namespace Semmle.Extraction.CSharp.Entities
return result;
}
public new static UserOperator Create(Context cx, IMethodSymbol symbol) => UserOperatorFactory.Instance.CreateEntity(cx, symbol);
public new static UserOperator Create(Context cx, IMethodSymbol symbol) => UserOperatorFactory.Instance.CreateEntityFromSymbol(cx, symbol);
class UserOperatorFactory : ICachedEntityFactory<IMethodSymbol, UserOperator>
{