Skip to content

map param compiler error, function with return value

Submitted by G??bor Szalai

Link to original bug (#566094)

Description

The compiler incorrectly report error: Cannot determine system component in map' operation with param' clause

if the function has return value:

module proba{

type port PT1 message { inout charstring;

map param ( in integer p_p1)

}

type component CT{ port PT1 p1; }

type component CTS{ port PT1 p2; }

testcase T1() runs on CT { map(self:p1,system:p1) }

function t2_init() runs on CT system CTS { map(self:p1,system:p2) param (21) // OK }

function t2_init2() runs on CT system CTS return integer{ map(self:p1,system :p2) param (21) // error return 1 }

}

Version: 7.1.0