public class Vector<T> {

  internal T[] items;

  public Vector() {
  }

  public Vector.from(T[] source) {
    items = source;
  }

  public T get(int i) {
    return items[i];
  }

}

int main() {

  print("Vala Bug 725759\n\n");

  print("The next line should read 'Fred, Daphne, Velma, Scooby, Shaggy':\n");
  var a = new Vector<string>.from({"Fred", "Daphne", "Velma", "Scooby", "Shaggy"});
  print("%s, %s, %s, %s, %s\n\n",
        a.get(0), a.get(1),
        a.get(2), a.get(3),
        a.get(4));

  print("The next line should read '501, 502, 503, 504, 505, 506':\n");
  var b = new Vector<long>.from({501l, 502l, 503l, 504l, 505l, 506l});
  print("%ld, %ld, %ld, %ld, %ld, %ld\n\n",
        b.get(0), b.get(1),
        b.get(2), b.get(3),
        b.get(4), b.get(5));

  print("The next line should read '601, 602, 603, 604, 605, 606':\n");
  var c = new Vector<int>.from({601, 602, 603, 604, 605, 606});
  print("%d, %d, %d, %d, %d, %d\n\n",
        c.get(0), c.get(1),
        c.get(2), c.get(3),
        c.get(4), c.get(5));

  print("The next line should read 'a, b, c, d, e, f':\n");
  var d = new Vector<char>.from({'a', 'b', 'c', 'd', 'e', 'f'});
  print("%c, %c, %c, %c, %c, %c\n\n",
        d.get(0), d.get(1),
        d.get(2), d.get(3),
        d.get(4), d.get(5));

  return 0;
}
