TypeScript/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt

21 lines
1.1 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-11-05 21:26:03 +01:00
tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.
Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts (2 errors) ====
class C {
private x = 1;
}
class D extends C { }
function foo(x: "hi", items: string[]): typeof foo;
~~~
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
function foo(x: string, items: string[]): typeof foo {
return null;
}
var a: D = foo("hi", []);
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.
!!! error TS2322: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'.
2014-07-13 01:04:16 +02:00