Skip to content

Commit

Permalink
Fixes for #1946
Browse files Browse the repository at this point in the history
- Types.subtype2:
  + check of tuple vs. type: i.e. abs(fcallReturningTuple)
    we try subtype of the first tuple element with the other type!


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14046 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 24, 2012
1 parent a07c9c2 commit 89032e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Compiler/FrontEnd/Types.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,19 @@ algorithm
then
true;

// check of tuple vs. type: i.e. abs(fcallReturningTuple)
// we try subtype of the first tuple element with the other type!
case (DAE.T_TUPLE(tupleType = tp1::_), tp2, _)
equation
true = subtype2(tp1, tp2, requireRecordNamesEqual);
then
true;
case (tp1, DAE.T_TUPLE(tupleType = tp2::_), _)
equation
true = subtype2(tp1, tp2, requireRecordNamesEqual);
then
true;

// Part of MetaModelica extension. KS
case (DAE.T_METALIST(listType = t1),DAE.T_METALIST(listType = t2),_) then subtype(t1,t2);
case (DAE.T_METAARRAY(ty = t1),DAE.T_METAARRAY(ty = t2),_) then subtype(t1,t2);
Expand Down

0 comments on commit 89032e8

Please sign in to comment.