ceylon/ceylon-compiler — Issue #269: locals named "string" 
Author: gavinking
Created: 2011-12-08 19:57:56+00:00
State: open
Labels: BUG, high priority

Consider:

void method() {
String string = "hello";
print(string);
}

The typechecker correctly resolves the value reference to the local variable. But the backend displays this error:

/Users/gavin/runtime-EclipseApplication/clean/src/bug.ceylon:3: non-static method toString() cannot be referenced from a static context
print(string);
^

It seems that the special handling for the `toString()` method is a bit clumsy.