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