Skip to content

fix(bindgen): generate constructors for abstract bridge classes#304

Open
wrbl606 wants to merge 1 commit into
masterfrom
fix/abstract-bridge-classes
Open

fix(bindgen): generate constructors for abstract bridge classes#304
wrbl606 wants to merge 1 commit into
masterfrom
fix/abstract-bridge-classes

Conversation

@wrbl606
Copy link
Copy Markdown
Collaborator

@wrbl606 wrbl606 commented May 23, 2026

The $constructors filter in bindgen was excluding non-factory constructors for abstract classes, but bridge classes themselves are concrete - even when the class they wrap
is abstract. This caused an UnimplementedError when instantiat
ing subclasses of an abstract bridge class in the VM.

Added || isBridge to the filter so bridge class constructors are always generated regardless of the source
class's abstractness.

Closes #275

The $constructors filter in bindgen was excluding non-factory
constructors for abstract classes, but bridge classes themselves are
concrete -- even when the class they wrap is abstract. This caused a
runtime UnimplementedError when instantiating subclasses of an abstract
bridge class in the eval VM.

Added `|| isBridge` to the filter so bridge class constructors are
always generated regardless of the source class's abstractness. Also
added 3 test cases covering subclassing abstract bridges with positional
params, named/required params, and returning instances to the host.

Closes #275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No contructors are generated for bridge classes

1 participant