Opened 7 years ago

Closed 7 years ago

#4838 closed defect (fixed)

CevalFunction ignores tail recursion

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: blocker Milestone: 1.13.0
Component: Frontend Version:
Keywords: Cc:

Description

loadString("
function summa
  input Integer a;
  input Integer i;
  output Integer b;
  algorithm
  if i == 0 then
    b := a;
  else
    b := summa(a+1,i-1); // calls summa; ignores the assignment
  end if;
end summa;
");getErrorString();
summa(0,4);getErrorString(); // returns 0

Change History (3)

comment:1 by Martin Sjölund, 7 years ago

Owner: changed from somebody to Martin Sjölund
Status: newaccepted

comment:3 by Martin Sjölund, 7 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.