Changeset 13674


Ignore:
Timestamp:
Oct 4, 2019 4:29:14 PM (2 months ago)
Author:
molsson
Message:

#5843 Lookup can now find libraries with incorrect file name casing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-mo-2265/Compiler/ModelicaFrontEnd/src/jastadd/instance/InstLookupClasses.jrag

    r13532 r13674  
    261261        HashMap<String,SrcLibNode> map = new HashMap<String,SrcLibNode>(prog.getNumSrcLibNode() * 4 / 3 + 1);
    262262        for (SrcLibNode ln : prog.getSrcLibNodes()) {
    263             if (!map.containsKey(ln.name())) {
    264                 map.put(ln.name(), ln);
     263            String name = ln.name().toLowerCase();
     264            if (!map.containsKey(name)) {
     265                map.put(name, ln);
    265266            }
    266267        }
     
    269270
    270271    syn lazy InstLookupResult<InstClassDecl> InstProgramRoot.lookupLibrary(String name) {
    271         SrcLibNode ln = libraryMap().get(name);
     272        SrcLibNode ln = libraryMap().get(name.toLowerCase());
    272273        if (ln != null) {
    273274            InstClassDecl icd = createInstClassDecl(ln);
Note: See TracChangeset for help on using the changeset viewer.