Esempio n. 1
0
 public SetType(PLanguageType elementType) : base(TypeKind.Set)
 {
     ElementType = elementType;
 }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
 public override bool IsAssignableFrom(PLanguageType otherType)
 {
     return(otherType.Canonicalize() is ForeignType other &&
            CanonicalRepresentation == other.CanonicalRepresentation);
 }
Esempio n. 4
0
 public override bool IsAssignableFrom(PLanguageType otherType)
 {
     return(TypeDefDecl.Type.IsAssignableFrom(otherType));
 }
Esempio n. 5
0
 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);
 }