public override bool Equals(Symbol?other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other is ConstructorSymbol otherConstructor &&
            ContainingSymbol == otherConstructor.ContainingSymbol &&
            Name == otherConstructor.Name &&
            ParameterDataTypes.SequenceEqual(otherConstructor.ParameterDataTypes));
 }
 public override bool Equals(Symbol?other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other is FunctionSymbol otherFunction &&
            ContainingSymbol == otherFunction.ContainingSymbol &&
            Name == otherFunction.Name &&
            ParameterDataTypes.SequenceEqual(otherFunction.ParameterDataTypes) &&
            ReturnDataType == otherFunction.ReturnDataType);
 }
Esempio n. 3
0
 public override bool Equals(Symbol?other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other is MethodSymbol otherMethod &&
            ContainingSymbol == otherMethod.ContainingSymbol &&
            Name == otherMethod.Name &&
            SelfDataType == otherMethod.SelfDataType &&
            ParameterDataTypes.SequenceEqual(otherMethod.ParameterDataTypes) &&
            ReturnDataType == otherMethod.ReturnDataType);
 }