#2159 Compilation error when using Java classes from packges named 'it'

SlimerDude Mon 1 Jul 2013

If I have the following:

using [java] it::AfDude

class Wotever { ... }

I get a compilation error of Wotever.fan(1,14): Expected identifier.

If I have:

Void upload() {
  af := it::AfDude()
}

I get the compilation error Expected end of statement: semicolon, newline, or end of block; not ::

How can I reference Java code in an it package?

I want to use ftp4j but it's produced by an Italian company and their top level domain (and java package) is it !!!?? Example:

using [java] it.sauronsoftware.ftp4j::FTPClient

brian Mon 1 Jul 2013

You should be able to do:

using "[java] it::AfDude"

SlimerDude Mon 1 Jul 2013

Cheers Brian.

using "[java]it::AfDude"

(note no spaces) compiles but doesn't seem to import AfDude as it can not be found. But both:

using "[java]it"
using "[java]it"::AfDude

seem to work okay.

Is this ticket worthy? As escaping valid (but questionable) pod names / java packages isn't that intuitive.

brian Mon 1 Jul 2013

I actually designed it that way so that you could always use any string you needed to with an FFI

SlimerDude Mon 1 Jul 2013

Okay, that's cool. I guess it's unlikely you'll have a pod named "it'!

Login or Signup to reply.