The error message is possibly one of the worst I have ever seen... >>> for (a of {}) {} Exception: TypeError: a of {} is not a function. (In 'a of {}', 'a of {}' is undefined) I'm not even remotely sure how anyone would be able to debug this without tears.
This goes even more bonkers if the left hand side is a variable declaration with destructuring, it seems to include source text outside of the for loop entirely: >>> /* comment */ for (var {a} of {}) {} Exception: TypeError: /* comment */ for (var {a} of {} is not a function. (In '/* comment */ for (var {a} of {}', '/* comment */ for (var {a} of {}' is undefined)
Heh, this makes me chuckle every time I see it!
Hah I'll try to fix this tmrw.