Skip to content

Commit

Permalink
- Fixed Types.elabType for empty records.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4496 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 12, 2009
1 parent fe8cf75 commit ab32589
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Compiler/Codegen.mo
Expand Up @@ -5225,6 +5225,12 @@ algorithm
then
(cfn,tvar,tnr);

case (Exp.CALL(path = Absyn.IDENT(name = "mmc_unbox_record"),expLst = {s1},tuple_ = false,builtin = true, ty = tp),tnr,context)
equation
tvar = "/* mmc_unbox_record failed: " +& Exp.typeString(tp) +& "*/";
then
(cEmptyFunction,tvar,tnr);

//----
end matchcontinue;
end generateBuiltinFunction;
Expand Down
11 changes: 9 additions & 2 deletions Compiler/Types.mo
Expand Up @@ -3725,7 +3725,7 @@ algorithm

case ((T_NORETCALL(),_)) then Exp.T_NORETCALL();

case ((T_COMPLEX(CIS,tcvl as _::_,_,_),_))
case ((T_COMPLEX(CIS,tcvl,_,_),_))
local
list<Var> tcvl;
ClassInf.State CIS;
Expand All @@ -3738,7 +3738,14 @@ algorithm
then
t_1;
/* This is the case when the type is currently UNTYPED */
case ((_,_)) /* equation print(" untyped \n"); */ then Exp.OTHER();
case ((_,_))
equation
/*
print(" untyped ");
print(unparseType(inType));
print("\n");
*/
then Exp.OTHER();
end matchcontinue;
end elabType;

Expand Down

0 comments on commit ab32589

Please sign in to comment.