/// <summary> /// Creates an uninitialized pointer type from an element /// type and a pointer kind. /// </summary> /// <param name="elementType"> /// The type of element referred to by the pointer. /// </param> /// <param name="kind"> /// The pointer's kind. /// </param> private PointerType(IType elementType, PointerKind kind) : base(elementType) { this.Kind = kind; }
/// <summary> /// Creates a pointer type of a particular kind that has a /// type as element. /// </summary> /// <param name="type"> /// The type of values referred to by the pointer type. /// </param> /// <param name="kind"> /// The kind of the pointer type. /// </param> /// <returns>A pointer type.</returns> internal static PointerType Create(IType type, PointerKind kind) { return(instanceCache.Intern(new PointerType(type, kind))); }
/// <inheritdoc/> public override bool Equals(PointerKind other) { return(object.ReferenceEquals(this, other)); }