コード例 #1
0
 public SetType(PLanguageType elementType) : base(TypeKind.Set)
 {
     ElementType = elementType;
 }
コード例 #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));
 }
コード例 #3
0
ファイル: ForeignType.cs プロジェクト: yzhang90/P-1
 public override bool IsAssignableFrom(PLanguageType otherType)
 {
     return(otherType.Canonicalize() is ForeignType other &&
            CanonicalRepresentation == other.CanonicalRepresentation);
 }
コード例 #4
0
 public override bool IsAssignableFrom(PLanguageType otherType)
 {
     return(TypeDefDecl.Type.IsAssignableFrom(otherType));
 }
コード例 #5
0
ファイル: EnumType.cs プロジェクト: tushetodorov/P
 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);
 }