﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1022	External function with no input parameters do not typecheck!	Adrian Pop	Adrian Pop	"Bug pointed out by Alexander.Roehnsch <AT> dlr <DOT> de. Thanks!

I changed ExternalFunc1_ext() to take no arguments. Changed all the signatures and implementations. Like in the C file:
{{{double ExternalFunc1_ext()
 {
 return 2;
 } }}}

And in the model:
{{{function ExternalFunc1

  output Real y;

  external y=ExternalFunc1_ext()

  annotation(Library=""libExternalFunc1_ext.o"",
 Include=""#include\""ExternalFunc1_ext.h\"""");

end ExternalFunc1;}}}

With a later call to:
{{{der(x)=-ExternalFunc1();}}}

Running the script gives off:
{{{>> runScript(""ExternalLibraries.mos"")

""
true

0

0

record
 resultFile =
 ""Simulation failed.

  No matching function found for ExternalFunc1() of type function() =>
 Real,
  candidates are function() => Real

  Error occured while flattening model ExternalLibraries
 ""

end record
true""}}}"	defect	closed	high				fixed		Adrian Pop Adrian Pop
