Sfoglia il codice sorgente

fix(code-runtime): adopt the base seam's DUNDER_MEMBER resolution

The base seam branch resolved its DUNDER_MEMBER inconsistency by keeping
/^__.+__$/ and asserting `____` (empty middle between two `__` pairs) does not
match. Drop this branch's earlier /^__.*__$/ stopgap so the seam file is
byte-identical to its base: the earlier change only existed because the base
was self-inconsistent, and the base now owns a coherent decision.
Chinesezjc 1 mese fa
parent
commit
9dc9113ed7
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      packages/code-runtime/code-runtime/src/index.ts

+ 3 - 3
packages/code-runtime/code-runtime/src/index.ts

@@ -59,10 +59,10 @@ export const RESERVED_ERROR_MEMBERS: ReadonlySet<string> = new Set([
 ])
 
 /**
- * Dunder form (`__…__`, two `__` pairs with an optionally empty middle): object-protocol
- * slots in Python, refused as {@link RESERVED_ERROR_MEMBERS | error members} on every backend.
+ * Dunder form (`__x__`, non-empty middle): object-protocol slots in Python,
+ * refused as {@link RESERVED_ERROR_MEMBERS | error members} on every backend.
  */
-export const DUNDER_MEMBER = /^__.*__$/
+export const DUNDER_MEMBER = /^__.+__$/
 
 /**
  * Reserved words of every portable target language (ECMAScript ∪ Python),