Closed Bug 418285 Opened 16 years ago Closed 9 years ago

Round-trip bracing change with "with", "try..finally", inner function

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

js> f = function() { { with({}) try { } finally { function three() { return 3; } } } }
function () {
    {
        with ({}) {
            try {
            } finally {

                function three() {
                    return 3;
                }

            }
        }
    }
}
js> eval("" + f)
function () {
    with ({}) {
        try {
        } finally {

            function three() {
                return 3;
            }

        }
    }
}
Same thing can happen with "if" instead of "with" as the outer block.

js> f = function() { {if(v) try { } finally { function t() { } } } }
function () {
    {
        if (v) {
            try {
            } finally {

                function t() {
                }

            }
        }
    }
}
js> eval("" + f)
function () {
    if (v) {
        try {
        } finally {

            function t() {
            }

        }
    }
}

Assignee: general → nobody
No longer reproducible - Resolving as WFM.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.