Open
Description
TypeScript Version: 2.7.0-dev.20171226
Code
class A {
x: {y: string} = {y: 'y'};
}
class B extends A {
x: {y: string, z?: number};
}
Expected behavior:
I expected this not to warn because A#x
is assignable to B#x
.
Actual behavior:
index.ts(6,3): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.