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
[error] ./Overload.scala:29:10:None of the overloaded alternatives of method quz with types
[error] (fs: ((Ctx) ?=>Int)*):Nothing
[error] (f1: (Ctx) ?=>Int):Nothing
[error] match arguments (<?>=><?>)
[error] vale1= quz(_ ?=>1)
[error] ^^^
[error] ./Overload.scala:32:10:None of the overloaded alternatives of method quz with types
[error] (fs: ((Ctx) ?=>Int)*):Nothing
[error] (f1: (Ctx) ?=>Int):Nothing
[error] match arguments ((1:Int))
[error] valf1= quz(1)
[error] ^^^
Expectation
The snippet should compile.
Following the discussion in #16511 I understand that in case of method overloading we cannot rely on the actual type of method parameters to distinguish between two variants of the same method when context functions are involved. However we should be able to use the number of parameters instead and normally the compiler has no problem with that unless it has to deal with context functions and varargs vs a single argument at the same time.
I would also expect the PR linked above to have fixed case e1 as an explicit context lambda is used there but unfortunately it didn't solve the problem.
The text was updated successfully, but these errors were encountered:
Compiler version
3.3.0-RC1-bin-20221224-6f5bb34-NIGHTLY
Minimized code
Output
Expectation
The snippet should compile.
Following the discussion in #16511 I understand that in case of method overloading we cannot rely on the actual type of method parameters to distinguish between two variants of the same method when context functions are involved. However we should be able to use the number of parameters instead and normally the compiler has no problem with that unless it has to deal with context functions and varargs vs a single argument at the same time.
I would also expect the PR linked above to have fixed case
e1
as an explicit context lambda is used there but unfortunately it didn't solve the problem.The text was updated successfully, but these errors were encountered: