* Introduce literal freshness for literal enum members, allow enum references in ambient const initializers * Merge statements * Add enum literal readonly property test case * Accept better baselines post-merge
35 lines
630 B
Text
35 lines
630 B
Text
=== tests/cases/conformance/es6/for-ofStatements/for-of47.ts ===
|
|
var x: string, y: number;
|
|
>x : string
|
|
>y : number
|
|
|
|
var array = [{ x: "", y: true }]
|
|
>array : { x: string; y: boolean; }[]
|
|
>[{ x: "", y: true }] : { x: string; y: boolean; }[]
|
|
>{ x: "", y: true } : { x: string; y: boolean; }
|
|
>x : string
|
|
>"" : ""
|
|
>y : boolean
|
|
>true : true
|
|
|
|
enum E { x }
|
|
>E : E
|
|
>x : E.x
|
|
|
|
for ({x, y: y = E.x} of array) {
|
|
>{x, y: y = E.x} : { x: string; y?: E; }
|
|
>x : string
|
|
>y : E
|
|
>y = E.x : E
|
|
>y : number
|
|
>E.x : E
|
|
>E : typeof E
|
|
>x : E
|
|
>array : { x: string; y: boolean; }[]
|
|
|
|
x;
|
|
>x : string
|
|
|
|
y;
|
|
>y : number
|
|
}
|