|
|
`SemanticsVisitor::CheckInvokeExprWithCheckedOperands` made several
references to `expr` parameter in its `inout` parameter l-value-ness
validation logic to access arguments, which is wrong because `expr` is
not necessarily the same as `result`/`invoke` (the result of calling
`ResolveInvoke()` in the first line of the function. Changing it to
`invoke` for consistency.
Also add a special case logic to return early in case the resolved
invoke expr is `argument[0]` when the original invoke expr is
`T(funcThatReturnsT())`.
Closes #8659.
|