ceylon / ceylon-runtime

DEPRECATED
24 stars 5 forks source link

function called do() will not run in JVM #81

Closed lukedegruchy closed 9 years ago

lukedegruchy commented 9 years ago

Create the following top-level function:

shared void do() {
    print("done!");
}

Compile it and run it on the JVM.

ceylon run: Could not find toplevel function '$do'.

This definitely happens both in the IDE and the command-line using the JVM.

It's not clear if this affects the JavaScript runtime since in the IDE running this as JavaScript seemed to work but it wasn't clear when running from the command.

Edit: I've ruled out the JavaScript runtime because I wasn't using the command-line properly before. This affects only the JVM.

FroMage commented 9 years ago

Yeah, the function class is actually called do_.class

FroMage commented 9 years ago

Caused by https://github.com/ceylon/ceylon-runtime/commit/3dc68558be9b8457a174c3a03b00c52ae2a10c84 where we need to quote the package parts but not the class part.

FroMage commented 9 years ago

This is done for the CLI. Can you check that it's also fixed for the IDE please? It should use the same thing.

lukedegruchy commented 9 years ago

Confirmed from the IDE as I ran this for JVM and JavaScript just to be sure. Both were successful. I didn't bother checking the command line.

FroMage commented 9 years ago

Great thanks !