Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created December 11, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save controlflow/ed3a1587e8c52daa1bc3c86942b51cd8 to your computer and use it in GitHub Desktop.
Save controlflow/ed3a1587e8c52daa1bc3c86942b51cd8 to your computer and use it in GitHub Desktop.
if (referenceExpression.QualifierType() is IDeclaredType declaredType)
{
if (declaredType.GetTypeElement() is IStruct @struct && @struct.IsByRefLike)
{
consumer.AddHighlighting(new RefStructMethodGroupsError(referenceExpression));
}
}
if (referenceExpression.QualifierType() is IDeclaredType (IStruct { IsByRefLike: true }))
{
consumer.AddHighlighting(new RefStructMethodGroupsError(referenceExpression));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment