Skip to content

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Feb 5, 2019

#29714 included a slight change to make strict property initialization checks more conservative. Turns out that isn't workable (it was inconsistent in its handling of any and broke the nightly build), so this PR reverts the change. The actual issue that #29714 fixed is unaffected by this.

@weswigham
Copy link
Member

If we're reverting the bit that causes it, we should add a test case:

// @strict: true
// @target: es6
class Metadata {
    private _parent: Metadata | undefined;
    private _map: { [key: string]: any };

    constructor(parent?: Metadata) {
        this._parent = parent;
        this._map = Object.create(parent ? parent._map : null);
    }
}

so we know if it regresses before we get to publishing the nightly 😄

@ahejlsberg ahejlsberg merged commit 7c09657 into master Feb 5, 2019
@ahejlsberg ahejlsberg deleted the fixStrictPropertyInitialization branch February 5, 2019 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants