Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit b96cf71

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Fix function vectorization with type casting.
Belonging to [master]: - #2508 - OpenModelica/OpenModelica-testsuite#975
1 parent 1761f6d commit b96cf71

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Compiler/NFFrontEnd/NFCall.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ protected
955955
if listLength(exactMatches) == 1 then
956956
matchedFunc ::_ := exactMatches;
957957

958-
// Overwrite the actuall function name with the overload name
958+
// Overwrite the actual function name with the overload name
959959
// for builtin functions.
960960
if Function.isBuiltin(matchedFunc.func) then
961961
func := matchedFunc.func;

Compiler/NFFrontEnd/NFFunction.mo

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,9 +779,7 @@ uniontype Function
779779
end if;
780780

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

0 commit comments

Comments
 (0)