Project

General

Profile

Bug #2292

Fix error handling when unfixed extent passed to fixed extent input parameter

Added by Hynek Cihlar about 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
04/24/2014
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

Related issues

Related to Base Language - Bug #2133: fix precision for decimal, dynamic-extent variables Closed 01/21/2014 01/27/2014
Related to Base Language - Bug #2293: Fixing an unfixed extent output parameter causes an error Closed 04/24/2014

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:
  1. the /home/hc/p34141_Untitled8.ped is the actual program name, not some special string (i.e. if you save the test in a test1.p file, then this would be test1.p)
  2. 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 to ControlFlowOps$InternalEntryCaller.valid. The conversion change I think will be in the convert/user_functions.rules file.
  3. 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

This issue is fixed by #2293. Once #2293 is closed, this can be closed with Nofix resolution.

#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

Also available in: Atom PDF