TypeScript Version: 2.1.6 and 2.2.0-dev.20170212
Code
class Foo<T> {
f(x: Partial<T>) { }
}
class Bar<T> extends Foo<T & { a: number }> {
constructor() {
super();
this.f({ a: 0 });
}
}
Expected behavior:
Code compiles without error. Worked fine with 2.2.0-dev.20161204 and broke on 2.2.0-dev.20161205.
Actual behavior:
The following error is generated:
main.ts(7,10): error TS2345: Argument of type '{ a: 0; }' is not assignable to parameter of type 'Partial<T & { a: number; }>'.
TypeScript Version: 2.1.6 and 2.2.0-dev.20170212
Code
Expected behavior:
Code compiles without error. Worked fine with 2.2.0-dev.20161204 and broke on 2.2.0-dev.20161205.
Actual behavior:
The following error is generated: