Opened 11 years ago
Closed 11 years ago
#2724 closed defect (fixed)
Return error for non-constructor functions returning external objects
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
Code like the following is dangerous, because the Id destructor will be called on function exit (since it is a local variable...). Make the front-end return an error here instead.
import Id = ModelicaServices.modcount.HeapString; function shapeDescrTo3D input State state; input String descr; input Real length, width, height; input Real[3] at; input Real extra; output Id id;
Change History (2)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.