Skip to content

Commit

Permalink
[NF] Fix FBuiltin.getBasicTypes for NF.
Browse files Browse the repository at this point in the history
- ExternalObject is defined in ModelicaBuiltin in the NF and should not
  be added by FBuiltin.getBasicTypes when -d=newInst is set.

Belonging to [master]:
  - OpenModelica/OMCompiler#2363
  • Loading branch information
perost authored and OpenModelica-Hudson committed Apr 13, 2018
1 parent 5680ad3 commit 4d89e7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Compiler/FFrontEnd/FBuiltin.mo
Expand Up @@ -307,11 +307,12 @@ protected constant SCode.Element objectiveVarComp =
SCode.noComment, NONE(), Absyn.dummyInfo);

protected constant list<SCode.Element> basicTypes = {clockType, rlType, intType, strType, boolType, enumType, ExternalObjectType, realType, integerType, stringType, booleanType, uncertaintyType};
protected constant list<SCode.Element> basicTypesNF = {clockType, rlType, intType, strType, boolType, enumType, realType, integerType, stringType, booleanType, uncertaintyType};

public function getBasicTypes
output list<SCode.Element> tys;
algorithm
tys := basicTypes;
tys := if Flags.isSet(Flags.SCODE_INST) then basicTypesNF else basicTypes;
end getBasicTypes;

public function variableIsBuiltin
Expand Down

0 comments on commit 4d89e7f

Please sign in to comment.