Skip to content

Commit

Permalink
- Merging
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Oct 26, 2010
2 parents 993032b + 323bdfe commit 5c64b6e
Show file tree
Hide file tree
Showing 3 changed files with 883 additions and 31 deletions.
12 changes: 10 additions & 2 deletions Compiler/Lookup.mo
Expand Up @@ -2474,13 +2474,21 @@ algorithm
list<DAE.Exp> expl;
Integer x,dims;
case({},_) then true;
case(((exp as DAE.ICONST(integer = x)) :: expl ),dims)
// Constant index
case (exp :: expl, dims)
equation
x = Exp.expInt(exp);
true = (x<=dims);
true = checkSubscriptsRange2(expl,dims);
then
true;
case(_,_) then fail();
// Variable index, can't check at compile time.
case (exp :: expl, dims)
equation
failure(x = Exp.expInt(exp));
true = checkSubscriptsRange2(expl, dims);
then
true;
end matchcontinue;
end checkSubscriptsRange2;

Expand Down

0 comments on commit 5c64b6e

Please sign in to comment.