Commit
e399bfca105028d845a5541e2d275b0405fcbc9d
by noreplyMM frontend: fix uninit-output bugs (#15662)
* Expression.addVec was unused (only Expression.subVec is called from
ResolveLoops.mo). Remove addVec; the early-\`return;\` in its body
reads back an uninitialised output array.
* Expression.subVec hit the same uninit-output bug on the size-mismatch
path. Replace \`return;\` with \`fail();\` so an error message at the
caller surfaces, matching the function's documented behaviour.
* Static.elabExp_If: rewrote the inner \`_ := matchcontinue()\` to
return its values directly via \`(outCache, outExp, outProperties)
:= matchcontinue() … then (outCache, outExp, outProperties); \`.
Returning the values explicitly makes the data flow direct and
easier to analyze.
* Static.deduceIterationRange: initialise \`outRange\` and
\`outProperties\` with neutral sentinels (\`DAE.ICONST(0)\` /
\`DAE.PROP(T_UNKNOWN_DEFAULT, C_UNKNOWN)\`) to make the analysis
easier. (It was safe before, just hard to prove)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>