dynamic getConstantValue()

Returns the constant value of this literal. Throws StateError if literal is not constant, check before usage with isConstant().

Source

getConstantValue() {
  // TODO unit test
  List<Expression> constVals = [];
  elements.forEach((e) => constVals.add(e.getConstantValue()));
  return new Vector(constVals);
}