Description
TypeScript Version: 3.2? (whatever version is currently on the playground)
Search Terms: "error message", "unexpected", "type", "is not assignable to"
Code
var a = 3;
a = "hello";
vs:
var a = 3;
var b = "hello";
a = b;
Expected behavior:
Expect both error messages to say: "Type 'string' is not assignable to type 'number'."
Actual behavior:
The error message in the first snippet says: "Type '"hello"' is not assignable to type 'number'."
The error message for the second snippet correctly says: "Type 'string' is not assignable to type 'number'."
Playground Link:
Unexpected type listed error message: https://www.typescriptlang.org/play/#src=var%20a%20%3D%203%3B%0D%0Aa%20%3D%20%22hello%22%3B
Expected type listed error message: https://www.typescriptlang.org/play/#src=var%20a%20%3D%203%3B%0D%0Avar%20b%20%3D%20%22hello%22%3B%0D%0Aa%20%3D%20b%3B