ALF 1.0 FTF Avatar
  1. OMG Issue

ALF_ — Assignment of out parameters in if and switch statements

  • Key: ALF_-76
  • Legacy Issue Number: 17524
  • Status: closed  
  • Source: Model Driven Solutions ( Mr. Ed Seidewitz)
  • Summary:

    Subject: Assignment of out parameters in if and switch statements

    Subclauses: 14.2.13 ifStatement, 14.2.20 SwitchStatement

    According to Subclauses 9.8 and 9.9, it is not permitted to define a new local name in an if statement without an else clause or a switch statement without a default clause. The ifStatementAssignmentsAfter and switchStatementAssignments constraints in Subclauses 14.2.13 and 14.2.22 attempt to enforce this by requiring that the assignments after such if or switch statements be the same as those before the statement. However, this constraint is too strong. An out parameter does not have an assign source before it is first assignment, yet it is already defined as a local name. Therefore, the constraints should be loosened to allow an if statement without an else clause or a switch statement without a default clause to contain the first assignment of an out parameter.

  • Reported: ALF 1.0b2 — Thu, 19 Jul 2012 04:00 GMT
  • Disposition: Resolved — ALF 1.0
  • Disposition Summary:

    agreed

  • Updated: Fri, 6 Mar 2015 21:49 GMT