#2346 closed defect (fixed)
replaceable component with modifiers cause instantiation to fail
| Reported by: | Peter Aronsson | Owned by: | somebody | 
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.9.0 | 
| Component: | Frontend | Version: | trunk | 
| Keywords: | Cc: | Henrik Tidefelt | 
Description
Consider the following model, based on an example in the Belts (commercial) library:
package B 
  connector Flange_b 
    Real phi; 
    flow Real tau;
  end  Flange_b;
  partial model Base 
   parameter Real pD;
   Flange_b f_b;
  end Base;
  model BaseImpl 
    parameter Real pD;
    Real y;
    Flange_b f_b;
  end BaseImpl;
  model WA 
    parameter Real diam = 1;
    replaceable Base cm(pD = diam);
    Real x = cm.f_b.phi;
  end WA;
 
end B;
model Test 
  B.WA w(redeclare B.BaseImpl cm);
end Test;
This results in the error message: 
Error: Variable cm.f_b.phi not found in scope B.WA
Now, if you change the declaration in WA to:
replaceable Base cm(pD = /*diam*/ 1 );
it works fine.
I've tested to check this model in Dymola and it works fine.
This is a blocker for supporing the Belts library.
Change History (2)
comment:1 by , 12 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
comment:2 by , 12 years ago
| Cc: | added | 
|---|
  Note:
 See   TracTickets
 for help on using tickets.
    

Fixed in revision r17326.