Free cookie consent management tool by TermsFeed Policy Generator

Changeset 113


Ignore:
Timestamp:
03/31/08 14:15:44 (17 years ago)
Author:
swagner
Message:

Closed ticket #93

  • fixed handling of local variables in DelegatingOperator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/DelegatingOperator.cs

    r90 r113  
    3535        scope.AddVariable(new Variable(Guid.ToString(), new NullData()));
    3636
    37         // add aliases
    38         foreach(IVariableInfo variableInfo in VariableInfos)
     37        // add aliases and local variables
     38        foreach (IVariableInfo variableInfo in VariableInfos) {
    3939          scope.AddAlias(variableInfo.FormalName, variableInfo.ActualName);
     40          if (variableInfo.Local)
     41            scope.AddVariable(GetVariable(variableInfo.ActualName));
     42        }
    4043
    4144        CompositeOperation next = new CompositeOperation();
     
    5053        scope.RemoveVariable(Guid.ToString());
    5154
    52         // remove aliases
    53         foreach(IVariableInfo variableInfo in VariableInfos)
     55        // remove aliases and local variables
     56        foreach (IVariableInfo variableInfo in VariableInfos) {
    5457          scope.RemoveAlias(variableInfo.FormalName);
     58          if (variableInfo.Local)
     59            scope.RemoveVariable(variableInfo.ActualName);
     60        }
    5561
    5662        OnExecuted();
Note: See TracChangeset for help on using the changeset viewer.