ceylon/ceylon-compiler — Issue #249: Index operator [i] broken for strings
Author: gavinking
Created: 2011-11-30 01:33:21+00:00
State: open
Labels: BUG, high priority

This code:

value ch = "hello"[0];

causes the error:

/Users/gavin/ceylon.language/test/strings.ceylon:7: cannot find symbol
symbol : method item(ceylon.language.Natural)
location: class java.lang.String
value ch = "hello"[0];

because we fail to box the string:

final ceylon.language.Character ch = "hello".item(.ceylon.language.Natural.instance(0L));