A valid exported class can lose a later public member when an ECMAScript private method is written on the same line. This is a separate observed class-surface defect found while reviewing #3134.
Actual public Bun plugin input:
export class Calculate {
#if(value: number): number { return value } value(): number { return this.#if(4) / 2 }
}The equivalent one-line class used in the retained public probes is accepted by ordinary Bun.build. The declaration output from both the source-built V2 and V4 #3134 candidates is an empty exported Calculate class, omitting public value(). A control with an ordinary if method retains both public methods. V4 now correctly retains a subsequent exported function; that repaired regression is distinct from this remaining member omission.
Evidence: /tmp/dtsx-3134-v2-private-review-results.json and /tmp/dtsx-3134-v4-private-review-results.json. V2 was executed through its normally installed compiled public plugin with original payload identity verified; V4 used the owning public source plugin. The earliest affected released version is not established. Candidate metadata remains unreleased0.11.23 and must not be confused with the existing public0.11.23 artifact.
Acceptance:
- Reproduce through the owning public generator/Bun plugin and a normally packed strict consumer that imports Calculate and calls new Calculate().value(), with no consumer aliases or installed-runtime edits.
- Preserve all eligible public class members after private methods, including same-line and multiline forms and private names that coincide with grammar keywords. Keep private implementation details private.
- Fix the owning class extraction/member boundary logic, not authored formatting or generated declarations. Preserve accurate signatures and ordinary/private method controls.
- Retain actual source/payload identity, relevant full tests, types, lint, independent review and normal package release qualification before claiming downstream delivery.
Related #3134; this ticket records an observed earlier candidate behavior, not a new V4 regression or proof of a released-package fix.