Пример #1
0
 private bool Equals(ArraySymbol other)
 {
     return(base.Equals(other) &&
            Equals(ValueType, other.ValueType) &&
            Dimension == other.Dimension);
 }
Пример #2
0
 private TypeSymbol BindArrayRankSpecifiers(List<ArrayRankSpecifierSyntax> arrayRankSpecifiers, TypeSymbol variableType)
 {
     foreach (var arrayRankSpecifier in arrayRankSpecifiers)
     {
         int? dimension = null;
         if (arrayRankSpecifier.Dimension != null)
         {
             var boundRankSpecifier = Bind(arrayRankSpecifier.Dimension, BindExpression);
             if (boundRankSpecifier.Kind == BoundNodeKind.LiteralExpression)
                 dimension = Convert.ToInt32(((BoundLiteralExpression) boundRankSpecifier).Value);
         }
         variableType = new ArraySymbol(variableType, dimension);
     }
     return variableType;
 }
Пример #3
0
 private bool Equals(ArraySymbol other)
 {
     return base.Equals(other) 
         && Equals(ValueType, other.ValueType) 
         && Dimension == other.Dimension;
 }