Opened 9 years ago

#3890 new defect

Code generation for function pointers treat underscores wrong

Reported by: Per Östlund Owned by: Lennart Ochel
Priority: normal Milestone: Future
Component: Code Generation Version: v1.10.0-dev-nightly
Keywords: Cc:

Description

The following script fails because the generated code doesn't compile (use of undeclared identifier '_pf__with__underscores'). Removing the underscores from the function pointer works.

loadString("
partial function pf
  output Real y;
end pf;

function f
  output Real y = 1.0;
end f;

function test
  input Integer n;
  output Real x;
protected
  pf pf_with_underscores = f;
algorithm
  x := pf_with_underscores();
end test;
");

test(1);
getErrorString();
");

test(1);
getErrorString();

Change History (0)

Note: See TracTickets for help on using tickets.