ceylon/ceylon.language — Issue #58: List is broken
Author: chochos
Created: 2012-03-01 17:35:39+00:00
State: open

The `List` class either has to implement `FixedSized`, or it must not be used as return value for `span` and `segment` methods; `nonempty` cannot be used on it.

Some tests are breaking right now:

[ceylonc] ceylon.language/test/sequences.ceylon:45: compiler message file broken: key=compiler.err.ceylon arguments=expression must be a type with fixed size: List is not a supertype of FixedSized, {1}, {2}, {3}, {4}, {5}, {6}, {7}
[ceylonc] assert(nonempty singleton.span(0, 1), "nonempty singleton span(0,1)");
[ceylonc] ^

[ceylonc] ceylon.language/test/sequences.ceylon:143: compiler message file broken: key=compiler.err.ceylon arguments=expression must be a type with fixed size: List is not a supertype of FixedSized, {1}, {2}, {3}, {4}, {5}, {6}, {7}
[ceylonc] assert(nonempty result.span(0,0), "nonempty sequence.span(0,0)");
[ceylonc] ^

I think `List` should implement FixedSized (unless it's mutable but it doesn't seem to be).