// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`test.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
class A { }
function foo(x: Class<A>): A {
  return new x(); // OK
}

class B {
  constructor(_: any) { }
}
function bar(x: Class<B>): B {
  return new x(); // error (too few args)
}

=====================================output=====================================
class A {}
function foo(x: Class<A>): A {
  return new x(); // OK
}

class B {
  constructor(_: any) {}
}
function bar(x: Class<B>): B {
  return new x(); // error (too few args)
}

================================================================================
`;

exports[`test2.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
                                                                                | printWidth
=====================================input======================================
// A function to typecheck values against their types. Covariance of Class<.>
// makes it useless in such a function (when limited to classes and instances),
// since everything can be trivially satisfied by going to \`mixed\`.
declare function check<X>(cls: $Type<X>, inst: X): void;

class A { }
class B extends A { }
class C { }

check(B, new A);
check(A, new B);
check(C, new A);
check(C, new B);
check(B, new C);

=====================================output=====================================
// A function to typecheck values against their types. Covariance of Class<.>
// makes it useless in such a function (when limited to classes and instances),
// since everything can be trivially satisfied by going to \`mixed\`.
declare function check<X>(cls: $Type<X>, inst: X): void;

class A {}
class B extends A {}
class C {}

check(B, new A());
check(A, new B());
check(C, new A());
check(C, new B());
check(B, new C());

================================================================================
`;
