On 10/1/10 9:59 AM, Reece Dunn wrote:
Hi,

try 1 -- throw TypeError if T in 'new T' is not an object.
try 2 -- handle the case when using a null dispatch pointer: `new nullDisp;`

NOTE: given `new 3;` the engine should report IDS_UNSUPPORTED_ACTION
instead of IDS_NO_PROPERTY but this requires more changes to the code
(constr.vt is VT_EMPTY in both of these cases in engine.c).

We most likely should use to_object here. Please add a comment about it.

-        return E_FAIL;
+        return throw_type_error(ctx->parser->script, ei, V_DISPATCH(&constr) ? 
IDS_OBJECT_EXPECTED : IDS_NO_PROPERTY, NULL);


You can't access V_DISPATCH(&constr) here as you don't know if constr is of VT_DISPATCH type.


Jacek


Reply via email to