[Swift-devel] strange behavior evaluating function call as trace arg
Michael Wilde
wilde at mcs.anl.gov
Wed Feb 4 12:41:56 CST 2009
In this program:
--
trace(@toint("123"));
(int k) add (int i, int j)
{
k = i + j;
}
int m = add(123,456);
trace(m);
trace(add(123,456));
--
...the first and second trace() calls work OK.
When I add the third, I get:
Could not compile SwiftScript source: line 13:1: unexpected token: trace
It seems as if trace is picking up the @toint function call OK, but not
the call to "add".
(This case is condensed is from a more complex program where I first saw
this)
Is this my error, or swifts?
More information about the Swift-devel
mailing list