==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts (180 errors) ==== // type parameter type is not valid for arithmetic operand function foo(t: T) { var a: any; var b: boolean; var c: number; var d: string; var e: {}; var r1a1 = a * t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = a / t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = a % t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a4 = a - t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a5 = a << t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a6 = a >> t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a7 = a >>> t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a8 = a & t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a9 = a ^ t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a10 = a | t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a1 = t * a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = t / a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = t % a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a4 = t - a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a5 = t << a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a6 = t >> a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a7 = t >>> a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a8 = t & a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a9 = t ^ a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a10 = t | a; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = b * t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b / t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = b % t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b4 = b - t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b5 = b << t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b6 = b >> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b7 = b >>> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b8 = b & t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b9 = b ^ t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b10 = b | t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = t * b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = t / b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = t % b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b4 = t - b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b5 = t << b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b6 = t >> b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b7 = t >>> b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b8 = t & b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b9 = t ^ b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b10 = t | b; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = c * t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = c / t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = c % t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c4 = c - t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c5 = c << t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c6 = c >> t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c7 = c >>> t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c8 = c & t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c9 = c ^ t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c10 = c | t; ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = t * c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = t / c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = t % c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c4 = t - c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c5 = t << c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c6 = t >> c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c7 = t >>> c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c8 = t & c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c9 = t ^ c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c10 = t | c; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = d * t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = d / t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = d % t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d4 = d - t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d5 = d << t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d6 = d >> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d7 = d >>> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d8 = d & t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d9 = d ^ t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d10 = d | t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = t * d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = t / d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = t % d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d4 = t - d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d5 = t << d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d6 = t >> d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d7 = t >>> d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d8 = t & d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d9 = t ^ d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d10 = t | d; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e1 = e * t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e2 = e / t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e3 = e % t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e4 = e - t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e5 = e << t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e6 = e >> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e7 = e >>> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e8 = e & t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e9 = e ^ t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e10 = e | t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e1 = t * e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e2 = t / e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e3 = t % e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e4 = t - e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e5 = t << e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e6 = t >> e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e7 = t >>> e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e8 = t & e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e9 = t ^ e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e10 = t | e; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f1 = t * t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f2 = t / t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f3 = t % t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f4 = t - t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f5 = t << t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f6 = t >> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f7 = t >>> t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f8 = t & t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f9 = t ^ t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f10 = t | t; ~ !!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ !!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }