public SetType(PLanguageType elementType) : base(TypeKind.Set) { ElementType = elementType; }
public override bool IsAssignableFrom(PLanguageType otherType) { // Copying semantics: both the other key and value types must be subtypes of this key/value type. return(otherType.Canonicalize() is SetType other && ElementType.IsAssignableFrom(other.ElementType)); }
public override bool IsAssignableFrom(PLanguageType otherType) { return(otherType.Canonicalize() is ForeignType other && CanonicalRepresentation == other.CanonicalRepresentation); }
public override bool IsAssignableFrom(PLanguageType otherType) { return(TypeDefDecl.Type.IsAssignableFrom(otherType)); }
public override bool IsAssignableFrom(PLanguageType otherType) { // can only assign to an enum variable of the same enum type. // enum declarations are always reference-equal return((otherType as EnumType)?.EnumDecl == EnumDecl); }