Skip to content

Conversation

@sandersn
Copy link
Member

Fixes #8191 again, but re-breaks #8110 and #7801.

Previously, this was implicitly typed by the shape of its containing object literal.
This is not correct for JavaScript-style inheritance uses of object literals, and the previous fix was not correct either.
So we're going back to this: any in object literals for now.

Previously, `this` was implicitly typed by the shape of its containing object literal.
This is not correct for JavaScript-style inheritance uses of object literals, and the previous fix was not correct either.
So we're going back to `this: any` in object literals for now.
@sandersn
Copy link
Member Author

@ahejlsberg and @mhegazy here is the reversion to this:any in object literals. thisInObjectLiterals is the most interesting test since it specifically tests this case.

@mhegazy
Copy link
Contributor

mhegazy commented Apr 29, 2016

third time is a charm..

can we add a test for --noImplicitThis

@mhegazy
Copy link
Contributor

mhegazy commented Apr 29, 2016

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect/overly strong this inference for POJOs

4 participants