Skip to content

JRuby subclass cannot call super with arguments if parent constructor is varargs #2375

@headius

Description

@headius

From http://jira.codehaus.org/browse/JRUBY-6656. See that issue for attached reproduction files.

I subclass a Java class that has a varargs constructor in JRuby, the JRuby class attempts to call super(a,b) to invoke the superclasses constructor and this fails with:
ArgumentError: wrong number of arguments for constructor
initialize at varargsctor.rb:6
(root) at varargsctor.rb:11
Invoking super(nil) works, but super() and super(a,b) fail.
Sample Java class and JRuby subclass attached.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions