Closed Bug 683507 Opened 8 years ago Closed 8 years ago
assertion fired when constructing a Vector with the wrong number of parameters
var vError:Vector.<Number, int> = new Vector.<Number, int>; In release builds this fires a RTE "TypeError: Error #1128: Incorrect number of type parameters", but in debug builds this asserts. Assertion failed: "((argc==1))" ("../core/VectorClass.cpp":249) Runtime behavior should be the same whether running debug or release builds.
changeset: 6553:5c247366c666 user: Brent Baker <firstname.lastname@example.org> summary: Bug 683507: remove a test from the vector constructor testfile since it is asserting when run in debug mode. This testcase will be added back in as its own file (r=brbaker) http://hg.mozilla.org/tamarin-redux/rev/5c247366c666
at the risk of stating the obvious: If the code can be refactored so the RTE happens before the assert, great, otherwise we should just remove the assert.
Testcase can be added in once this is resolved.
(In reply to Edwin Smith from comment #2) > at the risk of stating the obvious: If the code can be refactored so the RTE > happens before the assert, great, otherwise we should just remove the assert. Looking at the code: the assert does not belong there. OP_applytype specifically allows for a number of type parameters not equal to 1, and Vector restricts that and needs to be responsible for throwing the error.
Assignee: nobody → lhansen
Obvious patch: remove the assert and move a comment to where it belongs.
Attachment #557430 - Flags: review?(edwsmith)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
changeset: 6564:db7dd23cd076 user: Lars T Hansen <email@example.com> summary: Fix 683507 - assertion fired when constructing a Vector with the wrong number of parameters (r=edwsmith) http://hg.mozilla.org/tamarin-redux/rev/db7dd23cd076
changeset: 6565:c2f81526c576 user: Brent Baker <firstname.lastname@example.org> summary: Bug 683507: testcase for Vector construction that uses multiple type args which should produce a RTE (r=brbaker) http://hg.mozilla.org/tamarin-redux/rev/c2f81526c576
You need to log in before you can comment on or make changes to this bug.