#2974 closed defect (fixed)
Insufficient type checking for polymorphic tuples
Reported by: | Per Östlund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.4 |
Component: | MetaModelica | Version: | trunk |
Keywords: | Cc: |
Description
The following program segfaults when test is called:
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;
Change History (3)
comment:1 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in 01fdb3e