ceylon/ceylon-compiler — Issue #239: Sequenced arguments of method of generic type
Author: gavinking
Created: 2011-11-27 06:55:48+00:00
State: open
Labels: BUG, high priority

Consider the following generic type:

class X() {
shared void algo(T... strings) {}
}

Now, let's invoke the method of the class with sequenced arguments:

X().algo("x", "y");

The compiler produces the following broken Java:

new X().algo(new ceylon.language.ArraySequence(.ceylon.language.String.instance("x"), .ceylon.language.String.instance("y")));

Notice the `ArraySequence`, where the type argument does not get substituted. The funny thing is I'm pretty sure you could just leave off the `` completely and let it be inferred. So this should be a really trivial fix, unless I'm missing something.