ceylon/ceylon-compiler — Issue #255: Named argument invocation fails when no arguments
Author: FroMage
Created: 2011-12-02 13:29:30+00:00
State: open
Labels: BEGINNER, BUG, high priority

The following fails:

```java
void foo() {
foo{};
}
```

With:

/home/stephane/src/java-eclipse/ceylon-compiler/test-src/com/redhat/ceylon/compiler/test/expression/operator/BasicOperators.ceylon:31: Compiler error: java.lang.ArrayIndexOutOfBoundsException: -1
foo{};
^
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(ArrayList.java:324)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.initPositionalArguments(NamedArgumentCallHelper.java:206)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.initMethod(NamedArgumentCallHelper.java:265)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.defineSynthClass(NamedArgumentCallHelper.java:325)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.newSynthClass(NamedArgumentCallHelper.java:337)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.applyCall$Method(NamedArgumentCallHelper.java:347)
at com.redhat.ceylon.compiler.codegen.NamedArgumentCallHelper.generate(NamedArgumentCallHelper.java:354)
at com.redhat.ceylon.compiler.codegen.ExpressionTransformer.transformNamedInvocation(ExpressionTransformer.java:738)
at com.redhat.ceylon.compiler.codegen.ExpressionTransformer.transform(ExpressionTransformer.java:731)
at com.redhat.ceylon.compiler.codegen.CeylonVisitor.visit(CeylonVisitor.java:263)