Closed
Description
From #12005 (comment)
We can sometimes get into a state where we issue errors that appear to be nonsense:
interface T { }
declare const a: T;
class Foo<T> {
x: T;
fn() {
this.x = a;
}
}
When two types have the same spellings according to typeToString
, we should issue a more specific error, e.g.
"Type
T
is not assignable to typeT
. Two different types with this name exist, but they are unrelated."