# indent w/ 2 spaces
source: |
  array[uint[16], 2, 2] a = {{1, 2}, {3, 4}};
  array[uint[16], 2, 4] b = {{1, 2, 3, 4}, {5, 6, 7, 8}};
  // Various forms of testing that assignments can be made to indexed
  // identifiers, and from indexed identifiers.
  a = b[0:1][0:1];
  a[0:1] = b[0:1][0:1];
  a[0] = b[0][0:1];
  a[0][0] = b[0][0];
  a[0][0:1] = b[1][1:2:3];
  a[0:1][0] = b[0:1][0];
  a[0:1][0:1] = b[0:1][0:1];
reference: |
  program
    statementOrScope
      statement
        classicalDeclarationStatement
          arrayType
            array
            [
            scalarType
              uint
              designator
                [
                expression
                  16
                ]
            ,
            expressionList
              expression
                2
              ,
              expression
                2
            ]
          a
          =
          declarationExpression
            arrayLiteral
              {
              arrayLiteral
                {
                expression
                  1
                ,
                expression
                  2
                }
              ,
              arrayLiteral
                {
                expression
                  3
                ,
                expression
                  4
                }
              }
          ;
    statementOrScope
      statement
        classicalDeclarationStatement
          arrayType
            array
            [
            scalarType
              uint
              designator
                [
                expression
                  16
                ]
            ,
            expressionList
              expression
                2
              ,
              expression
                4
            ]
          b
          =
          declarationExpression
            arrayLiteral
              {
              arrayLiteral
                {
                expression
                  1
                ,
                expression
                  2
                ,
                expression
                  3
                ,
                expression
                  4
                }
              ,
              arrayLiteral
                {
                expression
                  5
                ,
                expression
                  6
                ,
                expression
                  7
                ,
                expression
                  8
                }
              }
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                rangeExpression
                  expression
                    0
                  :
                  expression
                    1
                ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                rangeExpression
                  expression
                    0
                  :
                  expression
                    1
                ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              expression
                0
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                expression
                  0
                ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              expression
                0
              ]
            indexOperator
              [
              expression
                0
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                expression
                  0
                ]
            indexOperator
              [
              expression
                0
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              expression
                0
              ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                expression
                  1
                ]
            indexOperator
              [
              rangeExpression
                expression
                  1
                :
                expression
                  2
                :
                expression
                  3
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
            indexOperator
              [
              expression
                0
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                rangeExpression
                  expression
                    0
                  :
                  expression
                    1
                ]
            indexOperator
              [
              expression
                0
              ]
          ;
    statementOrScope
      statement
        assignmentStatement
          indexedIdentifier
            a
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          =
          expression
            expression
              expression
                b
              indexOperator
                [
                rangeExpression
                  expression
                    0
                  :
                  expression
                    1
                ]
            indexOperator
              [
              rangeExpression
                expression
                  0
                :
                expression
                  1
              ]
          ;
    <EOF>
