Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SI-6912 Avoid a typer cycle in overload resolution.
c800d1f, and followup commits 1ddc935 and b10b582 modified error handling in `Infer#inferExprAlternative`. After these changes, this method could fail to resolve the overloaded alternative if: best != NoSymbol && !competing.isEmpty && !noAlternatives && pt.isErroneous This commit calls `setError` in that case, which prevents the cycle in `adapt`. While I didn't extract a reproduction from the original code base, I've included a test case that exhibits the same symptom. It was actually pretty tough to find an program that got close to this code path, but luckilly we've been pretty close to this bug in SI-5553 / 4f99c2e, and those test cases formed the basis for this one.
- Loading branch information