| Summary: | Appending NULL to a list of non-nullable elements should throw a NVE | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Harmon <pharmon> |
| Component: | EDT | Assignee: | Project Inbox <edt.javascriptgen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas, jqian |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Fixed for javagen. Passing it over to JSGen. verified on 201111210901's build |
For the testcase below, when the go() function on the library is invoked, it should print 2 "success" messages. Currently the test for moving a null to a list of non-nullables is failing. Once this problem is resolved for JavaGen, please route this bug to JSGen, as it is failing as well. package pkg1; // basic library library NonNullableListTest nullableList int?[] = [1,2,3]; nonnullableList int[] = [1,2,3]; myNull int? = null; function go() nullableList.appendElement(myNull); if (nullableList.getSize() == 4) SysLib.writeStdout("Appending null to nullable list works!"); else SysLib.writeStdout("Appending null to nullable list fails!"); end gotException boolean = false; try nonnullableList.appendElement(myNull); onException(exception NullValueException) gotException = true; onException(exception AnyException) end if (gotException && nonnullableList.getSize() == 3) SysLib.writeStdout("Appending null to non-nullable list works!"); else SysLib.writeStdout("Appending null to non-nullable list fails!"); end end end