Last Comment Bug 312260 - Bogus "undefined property" strict warning in switch discriminants
: Bogus "undefined property" strict warning in switch discriminants
Status: VERIFIED FIXED
: verified1.8
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.8rc1
Assigned To: Jeff Walden [:Waldo] (remove +bmo to email)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-12 20:50 PDT by :Gavin Sharp [email: gavin@gavinsharp.com]
Modified: 2006-04-09 21:23 PDT (History)
5 users (show)
bob: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
This easy? (3.20 KB, patch)
2005-10-14 16:07 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
brendan: review+
Details | Diff | Splinter Review

Description :Gavin Sharp [email: gavin@gavinsharp.com] 2005-10-12 20:50:59 PDT
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
Comment 1 Brendan Eich [:brendan] 2005-10-12 21:17:27 PDT
Anyone want to take this?  It should be easy.

/be
Comment 2 Jeff Walden [:Waldo] (remove +bmo to email) 2005-10-14 16:07:01 PDT
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.
Comment 3 Brendan Eich [:brendan] 2005-10-14 16:48:39 PDT
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
Comment 4 :Gavin Sharp [email: gavin@gavinsharp.com] 2005-10-16 15:15:17 PDT
Checked in on the trunk.
mozilla/js/src/jsopcode.tbl; new revision: 3.45;
Comment 5 Bob Clary [:bc:] 2005-10-21 01:37:06 PDT
Checking in regress-312260.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-312260.js,v  <--  regress-312260.js
initial revision: 1.1
done
Comment 6 Brendan Eich [:brendan] 2005-10-23 20:08:43 PDT
Looks like I fixed this on the branch in a patch for another bug.  No harm.

/be
Comment 7 Bob Clary [:bc:] 2006-04-09 21:23:59 PDT
verified fixed 1.8.x and trunk.

Note You need to log in before you can comment on or make changes to this bug.