CoffeeScriptRedux icon indicating copy to clipboard operation
CoffeeScriptRedux copied to clipboard

'use strict'?

Open ghost opened this issue 12 years ago • 3 comments

Fresh to redux (it's great), unsure why it ignores 'use strict' in my coffee?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ghost avatar Dec 23 '12 22:12 ghost

That'll probably have to do with the fact that the "use strict"; statement has no side effect, so the optimiser cleans it out. Try compiling with the "--no-optimise" flag. This should be treated as a special case though

delaaxe avatar Dec 24 '12 10:12 delaaxe

Yep, that's a bug in the optimiser. It has no concept of directives, so it just throws them out as dead code. For now, as @delaaxe says, use the --no-optimise flag.

michaelficarra avatar Dec 30 '12 08:12 michaelficarra

As of CoffeeScript 1.3.1, CoffeeScript enforces strict mode at compile time. Does your compiler do this as well/does it have plans to implement this feature?

adamkuipers avatar Jan 09 '13 23:01 adamkuipers