﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1826	Passing built in functions as funargs generates invalid C code	adabe588@…	Martin Sjölund	"I tried this with with `intString` and `stringInt` and they both fail, I'm guessing other built in functions as well. A workaround is to wrap the built in functions in a regular function, but either way should work I think.

Script:
{{{
setCommandLineOptions({""+g=MetaModelica""});
loadFile(""stringInt.mo""); getErrorString();
Test.test(); getErrorString();
}}}

stringInt.mos:
{{{
package Test

protected function app
  input  F f;
  input  String x;
protected
  partial function F
    input String inElement;
    output Integer outElement;
  end F;
algorithm
  f(x);
end app;

// Passing this as a funarg instead of stringInt works.
function si
  input String s;
  output Integer i;
algorithm
  i := stringInt(s);
end si;

function test
algorithm
  app(stringInt, ""123"");
end test;

end Test;

}}}"	defect	closed	high	1.9.0	Backend	trunk	fixed		
