//// [tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditoinIsStringType.ts] ////

=== conditionalOperatorConditoinIsStringType.ts ===
//Cond ? Expr1 : Expr2,  Cond is of string type, Expr1 and Expr2 have the same type
declare var condString: string;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))

declare var exprAny1: any;
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))

declare var exprBoolean1: boolean;
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

declare var exprNumber1: number;
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))

declare var exprString1: string;
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))

declare var exprIsObject1: Object;
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))

declare var exprAny2: any;
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

declare var exprBoolean2: boolean;
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

declare var exprNumber2: number;
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

declare var exprString2: string;
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

declare var exprIsObject2: Object;
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))

//Cond is a string type variable
condString ? exprAny1 : exprAny2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

condString ? exprBoolean1 : exprBoolean2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

condString ? exprNumber1 : exprNumber2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

condString ? exprString1 : exprString2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

condString ? exprIsObject1 : exprIsObject2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

condString ? exprString1 : exprBoolean1; // union
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

//Cond is a string type literal
"" ? exprAny1 : exprAny2;
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

"string" ? exprBoolean1 : exprBoolean2;
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

'c' ? exprNumber1 : exprNumber2;
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

'string' ? exprString1 : exprString2;
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

"  " ? exprIsObject1 : exprIsObject2;
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

"hello " ? exprString1 : exprBoolean1; // union
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

//Cond is a string type expression
function foo() { return "string" };
>foo : Symbol(foo, Decl(conditionalOperatorConditoinIsStringType.ts, 29, 38))

var array = ["1", "2", "3"];
>array : Symbol(array, Decl(conditionalOperatorConditoinIsStringType.ts, 33, 3))

typeof condString ? exprAny1 : exprAny2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

condString.toUpperCase ? exprBoolean1 : exprBoolean2;
>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

condString + "string" ? exprNumber1 : exprNumber2;
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

foo() ? exprString1 : exprString2;
>foo : Symbol(foo, Decl(conditionalOperatorConditoinIsStringType.ts, 29, 38))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

array[1] ? exprIsObject1 : exprIsObject2;
>array : Symbol(array, Decl(conditionalOperatorConditoinIsStringType.ts, 33, 3))
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

foo() ? exprString1 : exprBoolean1; // union
>foo : Symbol(foo, Decl(conditionalOperatorConditoinIsStringType.ts, 29, 38))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

//Results shoud be same as Expr1 and Expr2
var resultIsAny1 = condString ? exprAny1 : exprAny2;
>resultIsAny1 : Symbol(resultIsAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 43, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

var resultIsBoolean1 = condString ? exprBoolean1 : exprBoolean2;
>resultIsBoolean1 : Symbol(resultIsBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 44, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

var resultIsNumber1 = condString ? exprNumber1 : exprNumber2;
>resultIsNumber1 : Symbol(resultIsNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 45, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

var resultIsString1 = condString ? exprString1 : exprString2;
>resultIsString1 : Symbol(resultIsString1, Decl(conditionalOperatorConditoinIsStringType.ts, 46, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

var resultIsObject1 = condString ? exprIsObject1 : exprIsObject2;
>resultIsObject1 : Symbol(resultIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 47, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

var resultIsStringOrBoolean1 = condString ? exprString1 : exprBoolean1; // union
>resultIsStringOrBoolean1 : Symbol(resultIsStringOrBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 48, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

var resultIsAny2 = "" ? exprAny1 : exprAny2;
>resultIsAny2 : Symbol(resultIsAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 50, 3))
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

var resultIsBoolean2 = "string" ? exprBoolean1 : exprBoolean2;
>resultIsBoolean2 : Symbol(resultIsBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 51, 3))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

var resultIsNumber2 = 'c' ? exprNumber1 : exprNumber2;
>resultIsNumber2 : Symbol(resultIsNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 52, 3))
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

var resultIsString2 = 'string' ? exprString1 : exprString2;
>resultIsString2 : Symbol(resultIsString2, Decl(conditionalOperatorConditoinIsStringType.ts, 53, 3))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

var resultIsObject2 = "  " ? exprIsObject1 : exprIsObject2;
>resultIsObject2 : Symbol(resultIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 54, 3))
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

var resultIsStringOrBoolean2 = "hello" ? exprString1 : exprBoolean1; // union
>resultIsStringOrBoolean2 : Symbol(resultIsStringOrBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 55, 3))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

var resultIsAny3 = typeof condString ? exprAny1 : exprAny2;
>resultIsAny3 : Symbol(resultIsAny3, Decl(conditionalOperatorConditoinIsStringType.ts, 57, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditoinIsStringType.ts, 3, 11))
>exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 11))

var resultIsBoolean3 = condString.toUpperCase ? exprBoolean1 : exprBoolean2;
>resultIsBoolean3 : Symbol(resultIsBoolean3, Decl(conditionalOperatorConditoinIsStringType.ts, 58, 3))
>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))
>exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 11))

var resultIsNumber3 = condString + "string" ? exprNumber1 : exprNumber2;
>resultIsNumber3 : Symbol(resultIsNumber3, Decl(conditionalOperatorConditoinIsStringType.ts, 59, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditoinIsStringType.ts, 5, 11))
>exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditoinIsStringType.ts, 11, 11))

var resultIsString3 = foo() ? exprString1 : exprString2;
>resultIsString3 : Symbol(resultIsString3, Decl(conditionalOperatorConditoinIsStringType.ts, 60, 3))
>foo : Symbol(foo, Decl(conditionalOperatorConditoinIsStringType.ts, 29, 38))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditoinIsStringType.ts, 12, 11))

var resultIsObject3 = array[1] ? exprIsObject1 : exprIsObject2;
>resultIsObject3 : Symbol(resultIsObject3, Decl(conditionalOperatorConditoinIsStringType.ts, 61, 3))
>array : Symbol(array, Decl(conditionalOperatorConditoinIsStringType.ts, 33, 3))
>exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 11))
>exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 11))

var resultIsStringOrBoolean3 = typeof condString ? exprString1 : exprBoolean1; // union
>resultIsStringOrBoolean3 : Symbol(resultIsStringOrBoolean3, Decl(conditionalOperatorConditoinIsStringType.ts, 62, 3))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

var resultIsStringOrBoolean4 = condString.toUpperCase ? exprString1 : exprBoolean1; // union
>resultIsStringOrBoolean4 : Symbol(resultIsStringOrBoolean4, Decl(conditionalOperatorConditoinIsStringType.ts, 63, 3))
>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 11))
>toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --))
>exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 11))
>exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 11))

