Changeset 8cd9743 in OpenModelica


Ignore:
Timestamp:
2019-01-21T11:35:56+01:00 (3 years ago)
Author:
hudson <openmodelica@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, master, omlib-staging
Children:
25cfbd50
Parents:
683050ef
git-author:
Per Östlund <per.ostlund@…> (01/21/19 11:35:56)
git-committer:
hudson <openmodelica@…> (01/21/19 11:35:56)
Message:

[NF] Fix root class modifiers.

  • Allow ComponentRef.subscriptsN to handle N larger than the number of subscript parts. This can happen when the root class is a short class definition with modifiers.

Belonging to [master]:

  • OpenModelica/OMCompiler#2885
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/NFFrontEnd/NFComponentRef.mo

    rfbe0a667 r8cd9743  
    429429
    430430  function subscriptsN
    431     "Returns the subscripts of the N first parts of a cref in reverse order.
    432      Fails if the cref has fewer than N parts."
     431    "Returns the subscripts of the N first parts of a cref in reverse order."
    433432    input ComponentRef cref;
    434433    input Integer n;
     
    439438  algorithm
    440439    for i in 1:n loop
     440      if isEmpty(rest) then
     441        break;
     442      end if;
     443
    441444      CREF(subscripts = subs, restCref = rest) := rest;
    442445      subscripts := subs :: subscripts;
Note: See TracChangeset for help on using the changeset viewer.