Closed Bug 312260 Opened 20 years ago Closed 20 years ago

Bogus "undefined property" strict warning in switch discriminants

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.8rc1

People

(Reporter: Gavin, Assigned: Waldo)

Details

(Keywords: verified1.8)

Attachments

(1 file)

Testcase: switch ({}.foo) {} Result: Warning: reference to undefined property {}.foo <brendan> in a switch discriminant, that should be a Detecting case <brendan> so this strict warning is bogus, a bug
Anyone want to take this? It should be easy. /be
Target Milestone: --- → mozilla1.9alpha
Attached patch This easy?Splinter Review
This was tested against both the given testcase and against a testcase with 2000 case statements which should require one of the extended switch bytecodes. I haven't looked at this code (or much of the rest of js, for that matter) *at all* before this, however, so I might be missing something obvious to anyone more familiar with the code.
Attachment #199610 - Flags: review?(brendan)
Comment on attachment 199610 [details] [diff] [review] This easy? Yes, that easy. Thanks, please feel free to check in if you have CVS access (if you don't have CVS access, but want access, file a bug in the mozilla.org product, CVS access component, and reference your patch-work). /be
Attachment #199610 - Flags: review?(brendan) → review+
Checked in on the trunk. mozilla/js/src/jsopcode.tbl; new revision: 3.45;
Assignee: general → jwalden+bmo
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Checking in regress-312260.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-312260.js,v <-- regress-312260.js initial revision: 1.1 done
Flags: testcase+
Looks like I fixed this on the branch in a patch for another bug. No harm. /be
Keywords: fixed1.8
Target Milestone: mozilla1.9alpha → mozilla1.8rc1
verified fixed 1.8.x and trunk.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8verified1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: