TypeScript/tests/cases/conformance/salsa/thisPropertyAssignmentComputed.ts
Nathan Shively-Sanders b98cb0645d
Fix binding of this-assignments w/computed properties (#35639)
Top-level this-assignments do not support computed properties. But the
binder forgets to check for computed properties and tries to bind them
normally. This hits a helpful assert.

This change stop binding this-properties with computed properties at the
top-level.  There's nothing sensible we could do with them; we're unable
to late-bind entries to the global scope or to modules.
2019-12-11 15:55:08 -08:00

7 lines
138 B
TypeScript

// @allowjs: true
// @checkjs: true
// @noemit: true
// @strict: true
// @filename: thisPropertyAssignmentComputed.js
this["a" + "b"] = 0