The default bug view has changed. See this FAQ.

Bogus "undefined property" strict warning in switch discriminants

VERIFIED FIXED in mozilla1.8rc1

Status

()

Core
JavaScript Engine
VERIFIED FIXED
12 years ago
11 years ago

People

(Reporter: Gavin, Assigned: Waldo)

Tracking

({verified1.8})

Trunk
mozilla1.8rc1
verified1.8
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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
Created attachment 199610 [details] [diff] [review]
This easy?

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
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 5

12 years ago
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

Comment 7

11 years ago
verified fixed 1.8.x and trunk.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8 → verified1.8
You need to log in before you can comment on or make changes to this bug.