class Hoge.<T> {
  function make(): T { return new T(); }
}
class _Main {
  static function main(args: string[]): void {
    var v: variant = 42;
    var n: number = 0;
    log typeof v; // => number
    log n; // => 0

    var h = new Hoge.<number>();
    v = h.make();
    log typeof v; // expected "number" but "object"
    var n = h.make();
    log n; // expected 0 but {}
  }
}
