Closed clement-brodu closed 1 month ago
(moved my comment from #1121 ) I also noticed that if using DELETE WIDGET command instead of DELETE OBJECT. This rule does not recognize these so it gives a false positive.
BLOCK-LEVEL ON ERROR UNDO, THROW.
DEFINE VARIABLE xObj AS HANDLE NO-UNDO.
DEFINE VARIABLE xWid AS HANDLE NO-UNDO.
CREATE BUFFER xObj FOR TABLE "Item" NO-ERROR.
CREATE BUFFER xWid FOR TABLE "Customer" NO-ERROR. /* this line is flagged*/
FINALLY:
IF VALID-HANDLE (xObj) THEN DELETE OBJECT xObj.
IF VALID-HANDLE (xWid) THEN DELETE WIDGET xWid. /* this is not understood as a delete */
END.
Of course, in this case xWid is not a real widget. Could this be fixed too?
(moved my comment from #1121 ) I also noticed that if using DELETE WIDGET command instead of DELETE OBJECT. This rule does not recognize these so it gives a false positive.
BLOCK-LEVEL ON ERROR UNDO, THROW. DEFINE VARIABLE xObj AS HANDLE NO-UNDO. DEFINE VARIABLE xWid AS HANDLE NO-UNDO. CREATE BUFFER xObj FOR TABLE "Item" NO-ERROR. CREATE BUFFER xWid FOR TABLE "Customer" NO-ERROR. /* this line is flagged*/ FINALLY: IF VALID-HANDLE (xObj) THEN DELETE OBJECT xObj. IF VALID-HANDLE (xWid) THEN DELETE WIDGET xWid. /* this is not understood as a delete */ END.
Of course, in this case xWid is not a real widget. Could this be fixed too?
+1
Fixed in develop branch, will be included in next release
Hello,
Since 2.26.1, it's much better, but I found some false positive :