You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- [E134] TypeError:/workspace/dotty/bisect/main.scala:14:33-----------------14|valfail1:OnChannel=Mockito.mock[OnChannel] // fails|^^^^^^^^^^^^|None of the overloaded alternatives of method mock in objectMockitowith types
| [T](settings: MockSettings)(implicitevidence$2: reflect.ClassTag[T]):T| [T](implicitevidence$1: reflect.ClassTag[T²]):T²
|matchtypearguments [OnChannel] and expected typeOnChannel||where: T is a typevariable|T² is a typevariable-- [E134] TypeError:/workspace/dotty/bisect/main.scala:15:33-----------------15|valfail2:OnChannel=Mockito.mock // fails|^^^^^^^^^^^^|None of the overloaded alternatives of method mock in objectMockitowith types
| [T](settings: MockSettings)(implicitevidence$2: reflect.ClassTag[T]):T| [T](implicitevidence$1: reflect.ClassTag[T²]):T²
|match expected typeOnChannel||where: T is a typevariable|T² is a typevariable2 errors found
Expectation
Compiler should pick def mock[T : ClassTag]: T and allow for compilation
The text was updated successfully, but these errors were encountered:
The problem lied with slightly adjusted unapply of FunctionOf in a
previous PR, which caused different behavior in `resolveOverloaded`,
where due to a pattern match into a FunctionOf
`resolveOverloaded1` would return no candidates, causing more issues
later on.
To keep the new behavior of FunctionOf unapply (which as a side-effect
ended up fixing few issues represented with added tests), with the previous
behavior of overloaded functions, we allow the method candidate
filtering to fallback from the FunctionOf candidate filtering into the
previous behavior in case no candidates are kept. This also fixes an
additional case, which is not part of the regression, but produces
an incorrect error in similar manner.
Fixes#17245
Compiler version
3.3.1-RC1-nighlty
Last good release: 3.3.1-RC1-bin-20230302-8020c77-NIGHTLY
First bad release: 3.3.1-RC1-bin-20230303-6ad22aa-NIGHTLY
The commit-based bisect for range of commits 8020c77..6ad22aa failed due to other failures.
Minimized code
Based on Open CB failures in pjfanning/akka-rabbitmq, compilation logs can be found here: https://github.com/VirtusLab/community-build3/actions/runs/4650721329/jobs/8229907414
Output
Expectation
Compiler should pick
def mock[T : ClassTag]: T
and allow for compilationThe text was updated successfully, but these errors were encountered: