Skip to content

Conversation

@HerringtonDarkholme
Copy link
Contributor

Fixes #14187

// assignable to right hand side of forIn
for (var key in a) {
var val = a[key]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test (conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts) seems unrelated - would it be possible to remove this and create a new test? Something like conformance/types/nonPrimitive/indexingWithForInLoop01.ts seems more appropriate.

var a: object;

for (var key in a) {
var value = a[key]; // error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this isn't an error, right?

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.

4 participants