Correct errorForUsingPropertyOfTypeAsType03

Rename didn't work properly in a file with errors, so the test isn't
testing the right thing.
This commit is contained in:
Andrew Casey 2017-11-29 17:48:58 -08:00
parent cdd3cd4f51
commit 3a05363a29
5 changed files with 34 additions and 34 deletions

View file

@ -1,10 +1,10 @@
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(11,19): error TS2694: Namespace 'Color' has no exported member 'Red'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(13,19): error TS2339: Property 'Red' does not exist on type 'Color'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(19,13): error TS2503: Cannot find namespace 'T1'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(20,13): error TS2503: Cannot find namespace 'T1'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(19,13): error TS2702: 'C1' only refers to a type, but is being used as a namespace here.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(20,13): error TS2702: 'C1' only refers to a type, but is being used as a namespace here.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(21,16): error TS2339: Property 'Red' does not exist on type 'Color'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(23,13): error TS2503: Cannot find namespace 'T2'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(24,13): error TS2503: Cannot find namespace 'T2'.
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(23,13): error TS2713: Cannot access 'C2.Red' because 'C2' is a type, but not a namespace. Did you mean to retrieve the type of the property 'Red' in 'C2' with 'C2["Red"]'?
tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(24,13): error TS2713: Cannot access 'C2.Red' because 'C2' is a type, but not a namespace. Did you mean to retrieve the type of the property 'Red' in 'C2' with 'C2["Red"]'?
==== tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts (7 errors) ====
@ -30,21 +30,21 @@ tests/cases/compiler/errorForUsingPropertyOfTypeAsType03.ts(24,13): error TS2503
//let b2: (typeof Color).Red["toString"];
let b3: (typeof Color)["Red"]["toString"];
let c1: T1.Red.toString;
let c1: C1.Red.toString;
~~
!!! error TS2503: Cannot find namespace 'T1'.
let c2: T1.Red["toString"];
!!! error TS2702: 'C1' only refers to a type, but is being used as a namespace here.
let c2: C1.Red["toString"];
~~
!!! error TS2503: Cannot find namespace 'T1'.
!!! error TS2702: 'C1' only refers to a type, but is being used as a namespace here.
let c3: C1["Red"]["toString"];
~~~~~
!!! error TS2339: Property 'Red' does not exist on type 'Color'.
let d1: T2.Red.toString;
~~
!!! error TS2503: Cannot find namespace 'T2'.
let d2: T2.Red["toString"];
~~
!!! error TS2503: Cannot find namespace 'T2'.
let d1: C2.Red.toString;
~~~~~~
!!! error TS2713: Cannot access 'C2.Red' because 'C2' is a type, but not a namespace. Did you mean to retrieve the type of the property 'Red' in 'C2' with 'C2["Red"]'?
let d2: C2.Red["toString"];
~~~~~~
!!! error TS2713: Cannot access 'C2.Red' because 'C2' is a type, but not a namespace. Did you mean to retrieve the type of the property 'Red' in 'C2' with 'C2["Red"]'?
let d3: C2["Red"]["toString"];
}

View file

@ -17,12 +17,12 @@ namespace Test1 {
//let b2: (typeof Color).Red["toString"];
let b3: (typeof Color)["Red"]["toString"];
let c1: T1.Red.toString;
let c2: T1.Red["toString"];
let c1: C1.Red.toString;
let c2: C1.Red["toString"];
let c3: C1["Red"]["toString"];
let d1: T2.Red.toString;
let d2: T2.Red["toString"];
let d1: C2.Red.toString;
let d2: C2.Red["toString"];
let d3: C2["Red"]["toString"];
}

View file

@ -42,20 +42,20 @@ namespace Test1 {
>b3 : Symbol(b3, Decl(errorForUsingPropertyOfTypeAsType03.ts, 16, 7))
>Color : Symbol(Color, Decl(errorForUsingPropertyOfTypeAsType03.ts, 0, 17))
let c1: T1.Red.toString;
let c1: C1.Red.toString;
>c1 : Symbol(c1, Decl(errorForUsingPropertyOfTypeAsType03.ts, 18, 7))
let c2: T1.Red["toString"];
let c2: C1.Red["toString"];
>c2 : Symbol(c2, Decl(errorForUsingPropertyOfTypeAsType03.ts, 19, 7))
let c3: C1["Red"]["toString"];
>c3 : Symbol(c3, Decl(errorForUsingPropertyOfTypeAsType03.ts, 20, 7))
>C1 : Symbol(C1, Decl(errorForUsingPropertyOfTypeAsType03.ts, 5, 5))
let d1: T2.Red.toString;
let d1: C2.Red.toString;
>d1 : Symbol(d1, Decl(errorForUsingPropertyOfTypeAsType03.ts, 22, 7))
let d2: T2.Red["toString"];
let d2: C2.Red["toString"];
>d2 : Symbol(d2, Decl(errorForUsingPropertyOfTypeAsType03.ts, 23, 7))
let d3: C2["Red"]["toString"];

View file

@ -44,30 +44,30 @@ namespace Test1 {
>b3 : (radix?: number) => string
>Color : typeof Color
let c1: T1.Red.toString;
let c1: C1.Red.toString;
>c1 : any
>T1 : any
>C1 : any
>Red : any
>toString : No type information available!
let c2: T1.Red["toString"];
let c2: C1.Red["toString"];
>c2 : any
>T1 : any
>C1 : any
>Red : No type information available!
let c3: C1["Red"]["toString"];
>c3 : any
>C1 : Color
let d1: T2.Red.toString;
let d1: C2.Red.toString;
>d1 : any
>T2 : any
>C2 : any
>Red : any
>toString : No type information available!
let d2: T2.Red["toString"];
let d2: C2.Red["toString"];
>d2 : any
>T2 : any
>C2 : any
>Red : No type information available!
let d3: C2["Red"]["toString"];

View file

@ -16,11 +16,11 @@ namespace Test1 {
//let b2: (typeof Color).Red["toString"];
let b3: (typeof Color)["Red"]["toString"];
let c1: T1.Red.toString;
let c2: T1.Red["toString"];
let c1: C1.Red.toString;
let c2: C1.Red["toString"];
let c3: C1["Red"]["toString"];
let d1: T2.Red.toString;
let d2: T2.Red["toString"];
let d1: C2.Red.toString;
let d2: C2.Red["toString"];
let d3: C2["Red"]["toString"];
}