Opened 13 years ago

Last modified 13 years ago

#1629 closed defect (fixed)

Support default arguments for inherited components

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Martin Sjölund

Description

loadString("
function g
  input Real r := 1.5;
  output Real o := r;
protected
  Real y; // Should not be possible to change
end g;
function f
  extends g;
end f;
");
f(r=2.5);
f();
f(x=5.0);
f(y=9.0);
f(4.5);
f(4.5,"abc");

Change History (1)

comment:1 by Adrian Pop, 13 years ago

also add in the test:

f(someNotReallyThereArgument = 5, someOtherStuff = "blah"); // check for not existing args
f(5, "blah"); // check for wrong args.
Note: See TracTickets for help on using tickets.