Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#164 closed defect (invalid)

Cursor lost somewhere

Reported by: Maxim Reznik Owned by: vadim.godunko
Priority: major Milestone:
Component: Matreshka - League Version: 0.2.0
Keywords: Cc:

Description

Attached test raises exception.

Exception name: PROGRAM_ERROR
Message: Invalid iterator

Attachments (1)

test_cursor.adb (681 bytes ) - added by Maxim Reznik 9 years ago.

Download all attachments as: .zip

Change History (4)

by Maxim Reznik, 9 years ago

Attachment: test_cursor.adb added

comment:1 by vadim.godunko, 9 years ago

Component: MatreshkaMatreshka - League
Milestone: 0.3.0
Owner: set to vadim.godunko
Status: newassigned
Version: 0.2.0

comment:2 by vadim.godunko, 9 years ago

Resolution: invalid
Status: assignedclosed

This is expected behavior. Copy operation of returned object make copy of string and copy of cursor. String is new object, but cursor point to original string object. Original string object is finalized after the copy and invalidates all cursors which point to it.

To aviod this you can declare String_Source as limited type or make it controlled and provide own Assign operation.

comment:3 by vadim.godunko, 9 years ago

Milestone: 0.3.0
Note: See TracTickets for help on using tickets.