New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return values from TS functions not handled correctly. #704

Closed
jamesu opened this Issue Jun 23, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@jamesu
Contributor

jamesu commented Jun 23, 2014

If you have a function which calls a function on a non-existent object such as follows:

function foo()
{
    %firstThing = "chocolate";
    %something = "fudge";
    %somethingElse = %object.mix(%firstThing);
    echo("Mixed " @ %somethingElse);
}

And you run said function, i.e.

foo();

The following will be printed:

<input> (0): Unable to find object: '' attempting to call function 'mix'
Mixed fudge

What should be printed is "", since returning a previous value from the stack makes little sense.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Jun 23, 2014

Contributor

Should it not print "Mixed "? Obviously %somethingElse should be "", but what happens to the fixed string?

Contributor

crabmusket commented Jun 23, 2014

Should it not print "Mixed "? Obviously %somethingElse should be "", but what happens to the fixed string?

@crabmusket crabmusket added this to the 3.7 milestone Jun 23, 2014

@andr3wmac

This comment has been minimized.

Show comment
Hide comment
@andr3wmac

andr3wmac Jun 23, 2014

Contributor

I'm pretty sure that's what he meant. It should print "Mixed ". That's what it outputs with my fix in there.

Contributor

andr3wmac commented Jun 23, 2014

I'm pretty sure that's what he meant. It should print "Mixed ". That's what it outputs with my fix in there.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Jun 23, 2014

Contributor

Oh, cool.

Contributor

crabmusket commented Jun 23, 2014

Oh, cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment