looking up null different in TT

RESOLVED FIXED

Status

Tamarin
Tracing Virtual Machine
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Tommy Reilly, Assigned: Steven Johnson)

Tracking

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
var o = {};
trace(o[null]);

In TC:
undefined

In TT:
ReferenceError: Error #1081: Property null not found on Object and there is no default value.
	at global$init()
(Assignee)

Comment 1

10 years ago
also broken:

var o = [];
trace(o[null]);

and ditto for "undefined" for the key.

(Assignee)

Comment 2

10 years ago
bug actually is that dynamic lookups weren't correct for keys of type null, undefined, boolean, or namespace. fix is in the works. obviously we need to add an acceptance test for this, I'll do one of those too.
(Assignee)

Comment 3

10 years ago
Created attachment 324501 [details] [diff] [review]
Patch

box2dynamevec was simply rejecting keys of type null/void/bool/ns; it should have converted them to interned strings.
Assignee: treilly → stejohns
Status: NEW → ASSIGNED
Attachment #324501 - Flags: review?(treilly)
(Assignee)

Comment 4

10 years ago
Created attachment 324509 [details]
Acceptance test to verify this fix (passes now for both TC and TT)

Acceptance test, since existing sanities didn't catch this
Attachment #324509 - Flags: review?(treilly)
(Reporter)

Updated

10 years ago
Attachment #324501 - Flags: review?(treilly) → review+
(Reporter)

Updated

10 years ago
Attachment #324509 - Flags: review?(treilly) → review+
(Assignee)

Comment 5

10 years ago
pushed as changeset:   393:58fb13dc90c8
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.