|
|
@@ -48,10 +48,10 @@ export const RESERVED_BINDING_GLOBALS: ReadonlySet<string> = new Set([
|
|
|
* one shared contract so a request valid on one backend is valid on all. The
|
|
|
* JS `Error` exclusions (`name`, `message`, `stack`) and Python's
|
|
|
* exception-protocol members (`args`, `with_traceback`, `add_note`) are
|
|
|
- * listed by name; dunder-form names (`__*__`) are refused wholesale — several
|
|
|
- * are constrained CPython descriptors whose `setattr` raises while
|
|
|
- * constructing the rejection, and the exact set is an interpreter version
|
|
|
- * detail. Any other non-empty own property name is accepted everywhere.
|
|
|
+ * listed by name; dunder-form names (`__x__`, non-empty middle) are refused
|
|
|
+ * wholesale — several are constrained CPython descriptors whose `setattr`
|
|
|
+ * raises while constructing the rejection, and the exact set is an interpreter
|
|
|
+ * version detail. Any other non-empty own property name is accepted everywhere.
|
|
|
*/
|
|
|
export const RESERVED_ERROR_MEMBERS: ReadonlySet<string> = new Set([
|
|
|
'name', 'message', 'stack',
|
|
|
@@ -65,9 +65,11 @@ export const RESERVED_ERROR_MEMBERS: ReadonlySet<string> = new Set([
|
|
|
export const DUNDER_MEMBER = /^__.+__$/
|
|
|
|
|
|
/**
|
|
|
- * Reserved words of EVERY shipped backend language (ECMAScript ∪ Python),
|
|
|
+ * Reserved words of every portable target language (ECMAScript ∪ Python),
|
|
|
* refused as {@link CodeBindingNamespace.global} / error-class names by all
|
|
|
- * backends. The portable-identifier contract promises a namespace list valid
|
|
|
+ * backends. Python is a portability target here even though only the
|
|
|
+ * TypeScript worker ships in this PR (the CPython backend is a later PR in the
|
|
|
+ * stack). The portable-identifier contract promises a namespace list valid
|
|
|
* on one backend is valid on every backend; a per-language check would let
|
|
|
* `lambda` pass the TypeScript backend and fail the Python one. Extending the
|
|
|
* seam with a new language means widening this union (a breaking review of
|