Skip to content

Commit

Permalink
+ Type functions before typing classes.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14780 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
mahge committed Jan 15, 2013
1 parent 12f58e4 commit e8b019e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Compiler/FrontEnd/NFSCodeInst.mo
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ algorithm

// Mark structural parameters.
(cls, symtab) = assignParamTypes(cls, symtab);

// Type all instantiated functions.
((functions, symtab)) = List.fold(BaseHashTable.hashTableKeyList(functions),
NFTyping.typeFunction, (functions, symtab));

// Type the instantiated class.
(cls, symtab) = NFTyping.typeClass(cls, NFTyping.CONTEXT_MODEL(), symtab, functions);

Expand All @@ -176,10 +181,6 @@ algorithm
// Type the instantiated class again, to type any instantiated
// conditional components that might have been added.
(cls, symtab) = NFTyping.typeClass(cls, NFTyping.CONTEXT_MODEL(), symtab, functions);

// Type all instantiated functions.
((functions, symtab)) = List.fold(BaseHashTable.hashTableKeyList(functions),
NFTyping.typeFunction, (functions, symtab));

// Type check the typed class components.
(cls, symtab) = NFTypeCheck.checkClassComponents(cls, NFTyping.CONTEXT_MODEL(), symtab);
Expand Down

0 comments on commit e8b019e

Please sign in to comment.