Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Faulty expression braces (optimisation?) #21

Closed
robashton opened this issue Jun 29, 2011 · 2 comments
Closed

Faulty expression braces (optimisation?) #21

robashton opened this issue Jun 29, 2011 · 2 comments
Labels

Comments

@robashton
Copy link
Contributor

I've some code that looks like this:

 private void btnDivide_Click(object sender, RoutedEventArgs e)
    {
        Operate((x, y) => (int) (x / (y == 0 ? 0.000000001 : y)));
    }

Gets converted into

Calculator.MainPage.prototype.btnDivide_Click = function (sender, e) {
    this.Operate(function (x, y) {
            return Math.floor(x / (y === 0) ? 1E-09 : y);
        });
};

Something is going on here :-)

@robashton
Copy link
Contributor Author

(again, can't supply a test case because I'm having difficulties running them in the latest build, trying to sort that out)

@kg
Copy link
Member

kg commented Jun 29, 2011

Fixed in 6cfa0e4

@kg kg closed this as completed Jun 29, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants