[Swift-devel] strange behavior evaluating function call as trace arg
Mihael Hategan
hategan at mcs.anl.gov
Wed Feb 4 14:05:37 CST 2009
Looks like most nested invocations are broken, not specifically trace.
The following fails, too:
(int r) f(int i) {
r = i;
}
int x;
x = f(f(2));
----- "Michael Wilde" <wilde at mcs.anl.gov> wrote:
> 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?
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
More information about the Swift-devel
mailing list