Bug 24716 - typeof regexp returns function
Summary: typeof regexp returns function
Status: RESOLVED DUPLICATE of bug 22082
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 03:14 PDT by Peter Kim
Modified: 2009-03-20 08:18 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kim 2009-03-20 03:14:53 PDT
typeof /someregexp/ returns 'function'.

expected value is 'regexp'

in firefox, 'object' is returned.
Comment 1 Peter Kim 2009-03-20 06:36:57 PDT
looks like the consensus is that it should return 'object'

see discussion in mozilla bugzilla:

https://bugzilla.mozilla.org/show_bug.cgi?id=61911
Comment 2 Cameron Zwarich (cpst) 2009-03-20 08:18:07 PDT
Ironically, this was originally done for compatibility with Mozilla. Bug 22082 suggests that we should change it back.

*** This bug has been marked as a duplicate of 22082 ***