Please sign in to comment.
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...
Showing with 20 additions and 0 deletions.
|@@ -0,0 +1,4 @@|
|+t6912.scala:8: error: not found: type Xxxx|
|+ def test[T]: Xxxx = Foo1[T]|
|+one error found|