<?hh

// disable array -> "Array" conversion notice
error_reporting(error_reporting() & ~E_NOTICE);

interface IFoo {
}
function trav(Traversable $x) {
  echo "Traversable ", $x, "\n";
  var_dump($x);
}
function ktrav(KeyedTraversable $x) {
  echo "KeyedTraversable ", $x, "\n";
  var_dump($x);
}
function cont(Container $x) {
  echo "Container ", $x, "\n";
  var_dump($x);
}
function kcont(KeyedContainer $x) {
  echo "KeyedContainer ", $x, "\n";
  var_dump($x);
}
function ind(Indexish $x) {
  echo "Indexish ", $x, "\n";
  var_dump($x);
}
function ifoo(IFoo $x) {
  echo "IFoo ", $x, "\n";
  var_dump($x);
}
function main() {
  $arr = array();
  var_dump($arr instanceof Traversable);
  var_dump($arr instanceof KeyedTraversable);
  var_dump($arr instanceof Container);
  var_dump($arr instanceof KeyedContainer);
  var_dump($arr instanceof Indexish);
  var_dump($arr instanceof IFoo);
  trav($arr);
  ktrav($arr);
  cont($arr);
  kcont($arr);
  ind($arr);
  ifoo($arr);
}
main();
