jashkenas/coffee-script — Issue #2139: constructor.name polyfill is buggy under strict mode
Author: paulmillr
Created: 2012-02-25 13:46:50+00:00
State: open

```coffeescript
class Class
```

→

```javascript
var Class;
Class = (function() {
Class.name = 'Class';
function Class() {}
return Class;
})();
```

wrap it

```javascript
(function() {
'use strict';
var Class;
Class = (function() {
Class.name = 'Class';
function Class() {}
return Class;
})();
})();
```

Result: `TypeError: Attempted to assign to readonly property.`.