Bug #2292
Fix error handling when unfixed extent passed to fixed extent input parameter
Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04/24/2014
Due date:
% Done:
100%
billable:
No
vendor_id:
GCD
case_num:
Related issues
History
#1 Updated by Hynek Cihlar about 10 years ago
The following code sample causes the error message Calling procedure /home/hc/p34141_Untitled8.ped cannot input an indeterminate extent parameter if the sub-procedure foo /home/hc/p34141_Untitled8.ped parameter
is a fixed size extent. (11421) in Progress but not in P2J.
function foo returns int (input p as int extent 2). end. def var k as int extent. foo(input k).
This issue originated in the issue #2133, see the notes 23-26, 28, 30, 32.
#2 Updated by Constantin Asofiei about 10 years ago
Some notes here:
- the
/home/hc/p34141_Untitled8.ped
is the actual program name, not some special string (i.e. if you save the test in atest1.p
file, then this would betest1.p
) foo(input k)
converts to a direct Java method call, right? As ControlFlowOps are not involved in this case, we need to validate the parameters - but unfortunately this can't be done by the BlockManager APIs. I think the only choice is to convert any function call (for which its definition includes an extent parameter) to a ControlFlowOps API call, and add this parameter validation case toControlFlowOps$InternalEntryCaller.valid
. The conversion change I think will be in theconvert/user_functions.rules
file.- double-check if this error is emitted too when internal procedures or external programs are used.
#3 Updated by Greg Shah about 10 years ago
- Target version set to Milestone 11
#4 Updated by Hynek Cihlar almost 10 years ago
#5 Updated by Hynek Cihlar almost 10 years ago
Fixed by #2293.
#6 Updated by Hynek Cihlar almost 10 years ago
- % Done changed from 0 to 100
- Status changed from New to Feedback
#7 Updated by Greg Shah almost 10 years ago
- Status changed from Feedback to Closed
#8 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 11 to Cleanup and Stablization for Server Features