Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created November 30, 2016 00:33
Show Gist options
  • Save controlflow/440caa02105b112bac15b2a9b0f91ae9 to your computer and use it in GitHub Desktop.
Save controlflow/440caa02105b112bac15b2a9b0f91ae9 to your computer and use it in GitHub Desktop.
// C# specs paragraph 18.4
if (from is IPointerType && to is IPointerType)
{
IType toElementType = ((IPointerType)to).ElementType;
return predefinedType.Void.Equals(toElementType) ||
((IPointerType)from).ElementType.Equals(toElementType);
}
// C# specs paragraph 18.4
if (from is IPointerType fromPointer && to is IPointerType toPointer)
{
IType toElementType = toPointer.ElementType;
return predefinedType.Void.Equals(toElementType) ||
fromPointer.ElementType.Equals(toElementType);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment