Re: Ticket #937: assigning to integer destroys the object prematurely
- Posted by ghaberek (admin) Nov 28, 2022
- 1414 views
ChrisB said...
Is this still relevent?
Has it been fixed?
To my knowledge this has been fixed. The solution was to simply not allow this behavior. When you run this code on Euphoria 4.2 you'll now get this error message:
Cannot assign value with a destructor to an integer
ChrisB said...
Why would anyone want to call a routine this way?
They likely wouldn't, but the example is contrived specifically to demonstrate a worthwhile edge case that has to be considered and accounted for.
-Greg