TypeScript Version: 2.0.0
Code
class A<T> {
private _: T;
}
class B<T> {
private _: T;
}
function f() {
var o: A<void> | B<void> = new A<void>();
o instanceof A || o instanceof B;
o; // A<any>, should be A<void> | B<void>
}
Expected behavior:
A type of o after expr is A<void> | B<void>.
Actual behavior:
A type of o after expr is A<any>.