Open
Description
Note: it appears only in the last nightly version, so it's probably caused by one of the pull requests merged yesterday.
webassembly studio: https://webassembly.studio/?f=ih6p4z4fub
The following code is now producing an invalid error during compilation:
class Container {
public another: Another|null = null;
}
class Another {
public prop: i32 = 0;
}
export function doStuff( container: Container ): void {
if ( container.another !== null && container.another.prop > 1 ) { // TS2531: Object is possibly 'null'
container.another.prop = 2;
}
}
This was not a case previously and not a case in the current version of typescript.