Changeset 13917


Ignore:
Timestamp:
Oct 31, 2019 10:41:22 AM (3 weeks ago)
Author:
molsson
Message:

#5843 Made all fields in ScalarizingVariableInstance final.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-mo-2278-merge/Compiler/ModelicaMiddleEnd/src/jastadd/scalarization/Scalarization.jrag

    r13884 r13917  
    619619    public class ScalarizingVariableInstance {
    620620       
    621         private TypePrefixVariability variability;
    622        
    623         private VisibilityType visibility;
     621        private final TypePrefixVariability variability;
     622       
     623        private final VisibilityType visibility;
    624624       
    625625        // Binding expression
    626         private FExp bExp;
     626        private final FExp bExp;
    627627       
    628628        // (Mapped) attributes of this variable
    629         private Map<String, FAttribute> mattrs;
     629        private final Map<String, FAttribute> mattrs;
    630630       
    631631        // Full name of this variable
    632         private String name;
     632        private final String name;
    633633       
    634634        // input/output prefix of top-level variable
    635         private CausalityConnectorPrefix inputOutput;
    636        
    637         private Index index;
     635        private final CausalityConnectorPrefix inputOutput;
     636       
     637        private final Index index;
    638638       
    639639        private ScalarizingVariableInstance(String name, Map<String, FAttribute> mattrs, FExp be,
     
    645645            this.variability = variability;
    646646            this.visibility = visibility;
    647             this.inputOutput = inputOutput;
     647            /* If we have a record with input/output prefix that contains a parameter,
     648             * that parameter should not inherit the input/output prefix */
     649            this.inputOutput = variability.parameterOrLess() ? CausalityConnectorPrefix.NONE : inputOutput;
    648650        }
    649651       
     
    733735            } else {
    734736                fv.setBindingExpOpt(new Opt());
    735             }
    736             if (variability.parameterOrLess()){
    737                 inputOutput = CausalityConnectorPrefix.NONE;
    738737            }
    739738            fv.setTypePrefixVariability(variability);
Note: See TracChangeset for help on using the changeset viewer.