TypeScript/tests/baselines/reference/errorElaboration.errors.txt
2015-11-23 13:22:23 -08:00

25 lines
1.1 KiB
Plaintext

tests/cases/compiler/errorElaboration.ts(12,5): error TS2345: Argument of type '() => Container<Ref<string>>' is not assignable to parameter of type '() => Container<Ref<number>>'.
Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
Type 'Ref<string>' is not assignable to type 'Ref<number>'.
Type 'string' is not assignable to type 'number'.
==== tests/cases/compiler/errorElaboration.ts (1 errors) ====
// Repro for #5712
interface Ref<T> {
prop: T;
}
interface Container<T> {
m1: Container<Ref<T>>;
m2: T;
}
declare function foo(x: () => Container<Ref<number>>): void;
let a: () => Container<Ref<string>>;
foo(a);
~
!!! error TS2345: Argument of type '() => Container<Ref<string>>' is not assignable to parameter of type '() => Container<Ref<number>>'.
!!! error TS2345: Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
!!! error TS2345: Type 'Ref<string>' is not assignable to type 'Ref<number>'.
!!! error TS2345: Type 'string' is not assignable to type 'number'.