Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling super constructor with varargs results in error #12

Closed
Knorrke opened this issue Apr 28, 2021 · 1 comment
Closed

Calling super constructor with varargs results in error #12

Knorrke opened this issue Apr 28, 2021 · 1 comment

Comments

@Knorrke
Copy link
Contributor

Knorrke commented Apr 28, 2021

Calling the constructor public Polygon(boolean closeAndFill, double... points) in a sub class using super results in the following error:

Uncaught TypeError: parameters1[((i - parameterBegin) - 1)] is undefined
    executeNode Interpreter.ts:1019
    nextStep Interpreter.ts:757
    timerFunction Interpreter.ts:494
    periodicFunction Interpreter.ts:138

Test example:

new Test();
class Test extends Polygon {
    public Test(){
        // this works: 
        // super(true, new double[]{ 10, 10, 300, 10, 150, 200 });
        
        // this results in error:
        super(true, 10, 10, 300, 10, 150, 200);
    }
}
@martin-pabst
Copy link
Owner

Thank you for this perfect bug report!
-> Issue is fixed now.

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

No branches or pull requests

2 participants