[Swift-devel] @java() seems to be broken

Michael Wilde wilde at mcs.anl.gov
Fri Oct 28 09:14:35 CDT 2011


I mentioned this to Jon last night, Justin, and he was going to look at it, but maybe you can as well: @java() seems to be broken. I'd like to use it for a user's app.

I get the following from 0.93:

sandbox$ cat sin.swift
(float result) sin(float x) {
   result = @java("java.lang.Math", "sin", x);
}

float x = 0.5;
float y = sin(x);

tracef("sin(%p): %p", x, y);
sandbox$ which swift
/home/wilde/swift/src/0.93/cog/modules/swift/dist/swift-svn/bin/swift
sandbox$ swift sin.swift
no sites file specified, setting to default: /home/wilde/swift/src/0.93/cog/modules/swift/dist/swift-svn/etc/sites.xml
Execution failed:
        Karajan exception: kernel:variable @ java.xml, line: 4: Unsupported argument: type. Valid arguments are: [name]
sandbox$ 

Is a quick fix available?

Thanks,

- Mike


-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list