@@ -2561,10 +2561,10 @@ algorithm outExp := matchcontinue(inExp)
25612561 // print("subscript for cref "+&stringDelimitList(List.map(sublstcref,ExpressionDump.printSubscriptStr)," / ")+&"\n");
25622562 subslst = dimensionsToRange(ad);
25632563 subslst1 = rangesToSubscripts(subslst);
2564- // print("subscript for arraytype "+&intString(listLength(subslst1))+&" : "+&stringDelimitList(List.map(List.flatten(subslst1),ExpressionDump.printSubscriptStr)," ; ")+&"\n");
2564+ // print("subscript for arraytype "+&intString(listLength(subslst1))+&" --> "+&stringDelimitList(List.map(List.flatten(subslst1),ExpressionDump.printSubscriptStr)," ; ")+&"\n");
25652565 subslst = insertSubScripts(sublstcref,subslst1,{});
25662566 subslst1 = subslst;
2567- // print("subscript for new cref "+&intString(listLength(subslst1))+&" : "+&stringDelimitList(List.map(List.flatten(subslst1),ExpressionDump.printSubscriptStr)," / ")+&"\n");
2567+ // print("subscript for new cref "+&intString(listLength(subslst1))+&" --> "+&stringDelimitList(List.map(List.flatten(subslst1),ExpressionDump.printSubscriptStr)," / ")+&"\n");
25682568 cr = ComponentReference . crefStripLastSubs(cr);
25692569 crlst = List . map1r(subslst1,ComponentReference . subscriptCref,cr);
25702570 // print(stringDelimitList(List.map(crlst,ComponentReference.debugPrintComponentRefTypeStr)," ; ")+&"\n");
@@ -2613,22 +2613,23 @@ algorithm
26132613 Integer i;
26142614 DAE . Subscript sub;
26152615 list< DAE . Subscript > rest,lst,val;
2616- case (DAE . WHOLEDIM ()::rest,{{DAE . INDEX (exp = DAE . ICONST (i))}},_)
2616+ list< list< DAE . Subscript >> lsts;
2617+ case (DAE . WHOLEDIM ()::rest,_,_)
26172618 equation
26182619 // found a wholedim, replace with value, insert in lst
2619- val = List . first (value);
2620- lst = listAppend(listReverse(val) ,lstIn);
2620+ lsts = List . map (value,listReverse );
2621+ lsts = List . map1(lsts,listAppend ,lstIn);
26212622 rest = listReverse(rest);
2622- lst = listAppend(rest,lst );
2623- lst = listReverse(lst );
2623+ lsts = List . map1(lsts, List . appendr,rest );
2624+ lsts = List . map(lsts,listReverse );
26242625 then
2625- {lst} ;
2626- case (DAE . INDEX (exp= _)::rest,{{ DAE . INDEX (exp = DAE . ICONST (i))}} ,_)
2626+ lsts ;
2627+ case (DAE . INDEX (exp= _)::rest,_ ,_)
26272628 equation
26282629 sub = List . first(templSubScript);
2629- {lst} = insertSubScripts(rest,value,sub::lstIn);
2630+ lsts = insertSubScripts(rest,value,sub::lstIn);
26302631 then
2631- {lst} ;
2632+ lsts ;
26322633 else
26332634 then
26342635 value;
0 commit comments