﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2974	Insufficient type checking for polymorphic tuples	Per Östlund	Martin Sjölund	"The following program segfaults when test is called:
{{{#!mo
package P
  replaceable type T1 subtypeof Any;
  replaceable type T2 subtypeof Any;
  type Tup = tuple<T1, T2>;

  function f
    input Tup inTup;
  protected
    T1 t1;
    T2 t2;
  algorithm
    (t1, t2) := inTup;
    print(""t1 = "" + anyString(t1) + ""\n"");
    print(""t2 = "" + anyString(t2) + ""\n"");
  end f;

  function f2
    input Tup inTup;
  protected
    T1 t1;
  algorithm
    (t1, _) := inTup;
    f(t1);  // *** Calling f with wrong type ***
  end f2;
end P;

function test
protected
  tuple<Integer, String> tup = (3, ""test"");
algorithm
  P.f2(tup);
end test;
}}}"	defect	closed	normal	1.9.4	MetaModelica	trunk	fixed		
