Skip to content

Commit

Permalink
[NF] Fix function vectorization with type casting.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jun 15, 2018
1 parent 1761f6d commit b96cf71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Compiler/NFFrontEnd/NFCall.mo
Expand Up @@ -955,7 +955,7 @@ protected
if listLength(exactMatches) == 1 then
matchedFunc ::_ := exactMatches;

// Overwrite the actuall function name with the overload name
// Overwrite the actual function name with the overload name
// for builtin functions.
if Function.isBuiltin(matchedFunc.func) then
func := matchedFunc.func;
Expand Down
4 changes: 1 addition & 3 deletions Compiler/NFFrontEnd/NFFunction.mo
Expand Up @@ -779,9 +779,7 @@ uniontype Function
end if;

(margexp, mty, matchKind) := TypeCheck.matchTypes(tmpty, compty, argexp, false);
// Allow only exact matches for vectorization.
// No casting, generic... matches alllowed (which are allowed for non-vected function matching)
correct := TypeCheck.isExactMatch(matchKind);
correct := TypeCheck.isValidArgumentMatch(matchKind);
vectorized := true::vectorized;
end if;

Expand Down

0 comments on commit b96cf71

Please sign in to comment.