function outer(){ function inner(){} return inner.name } // node "inner" perry ""
// two classes both named Made, in different scopes: node "Made" perry "Made$4"
new (class extends Error{})("m").constructor.name // node "" perry "__anon_class_8"
String(class Klass{}) // node "class Klass {}" perry "function Klass() { [native code] }"
String(({ m(){ return 1 } }).m) // node "m() { return 1; }" perry "function () { [native code] }"
Top-level names and NamedEvaluation are correct; nested declarations and duplicate names are not, and the mangled forms (Made$4, __anon_class_8) leak the compiler's disambiguation into user-visible strings.
71 constructor.name uses in the cc bundle. Libraries routinely dispatch on constructor.name, and Function.prototype.toString is used for source reflection — both get wrong answers here rather than approximations.
Found by a differential stress-test of claude-code under perry.
Top-level names and NamedEvaluation are correct; nested declarations and duplicate names are not, and the mangled forms (
Made$4,__anon_class_8) leak the compiler's disambiguation into user-visible strings.71
constructor.nameuses in the cc bundle. Libraries routinely dispatch onconstructor.name, andFunction.prototype.toStringis used for source reflection — both get wrong answers here rather than approximations.Found by a differential stress-test of claude-code under perry.