// @target: es2015
// + operator on string type
declare var STRING: string;
var STRING1: string[] = ["", "abc"];

function foo(): string { return "abc"; }

class A {
    public a!: string;
    static foo() { return ""; }
}
namespace M {
    export var n: string = "";
}

var objA = new A();

// string type var
var ResultIsNumber1 = +STRING;
var ResultIsNumber2 = +STRING1;

// string type literal
var ResultIsNumber3 = +"";
var ResultIsNumber4 = +{ x: "", y: "" };
var ResultIsNumber5 = +{ x: "", y: (s: string) => { return s; } };

// string type expressions
var ResultIsNumber6 = +objA.a;
var ResultIsNumber7 = +M.n;
var ResultIsNumber8 = +STRING1[0];
var ResultIsNumber9 = +foo();
var ResultIsNumber10 = +A.foo();
var ResultIsNumber11 = +(STRING + STRING);
var ResultIsNumber12 = +STRING.charAt(0);

// miss assignment operators
+"";
+STRING;
+STRING1;
+foo();
+objA.a,M.n;