﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1844	Incorrect Type Unboxing (?) when calling funargs in if expressions	adabe588@…	Martin Sjölund	"The call to predicate in this code throws `Error: Type error in conditional ( predicate(#(i))). Expected Boolean, got #Boolean (in component: <NO COMPONENT>).`. Using anything other than an if expression seems to work properly (inside if statement, plain call), and calling constTrue directly in the if expression instead of the funarg also works.

{{{

package Test

function f
  input Predicate predicate;
  input Integer i;
  output Integer r;
protected
  partial function Predicate
    input Integer value;
    output Boolean result;
  end Predicate;
algorithm
  r := if predicate(i) then 1 else 2;
end f;

function constTrue
  input Integer x;
  output Boolean t;
algorithm
  t := true;
end constTrue;

function test
algorithm
  f(constTrue, 0);
end test;

end Test;
}}}
"	defect	closed	high	1.9.0	Frontend	trunk	fixed		
