TypeScript/tests/baselines/reference/enumAssignmentCompat2.errors.txt
2014-11-05 12:26:03 -08:00

59 lines
1.9 KiB
Plaintext

tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2322: Type 'typeof W' is not assignable to type 'number'.
tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2322: Type 'W' is not assignable to type 'typeof W'.
Property 'a' is missing in type 'Number'.
tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2322: Type 'number' is not assignable to type 'typeof W'.
tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2322: Type 'W' is not assignable to type 'WStatic'.
Property 'a' is missing in type 'Number'.
tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' is not assignable to type 'WStatic'.
==== tests/cases/compiler/enumAssignmentCompat2.ts (5 errors) ====
enum W {
a, b, c,
}
module W {
export class D { }
}
interface WStatic {
a: W;
b: W;
c: W;
}
var x: WStatic = W;
var y: typeof W = W;
var z: number = W; // error
~
!!! error TS2322: Type 'typeof W' is not assignable to type 'number'.
var a: number = W.a;
var b: typeof W = W.a; // error
~
!!! error TS2322: Type 'W' is not assignable to type 'typeof W'.
!!! error TS2322: Property 'a' is missing in type 'Number'.
var c: typeof W.a = W.a;
var d: typeof W = 3; // error
~
!!! error TS2322: Type 'number' is not assignable to type 'typeof W'.
var e: typeof W.a = 4;
var f: WStatic = W.a; // error
~
!!! error TS2322: Type 'W' is not assignable to type 'WStatic'.
!!! error TS2322: Property 'a' is missing in type 'Number'.
var g: WStatic = 5; // error
~
!!! error TS2322: Type 'number' is not assignable to type 'WStatic'.
var h: W = 3;
var i: W = W.a;
i = W.a;
W.D;
var p: W.D;