typeof < regexp instance > results in "function" instead of "object"

RESOLVED DUPLICATE of bug 61911

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 61911
12 years ago
12 years ago

People

(Reporter: Ish, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: All

This simple code: typeof /hello/; returns "function" instead of "object".

I do not see anywhere in ECMA-262 a definition for [[Call]] for RegExp instances. Other browsers support this also, IE, Opera, Safari and Omniweb all result in "object". 

This is a serious problem and can throw off functions expecting either an object or a function.

Reproducible: Always

*** This bug has been marked as a duplicate of 61911 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.