We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.1 3.2.2-RC1
//> using platform "jvm" //> using scala "3.2.1" @main def main() = { A { (a: Unit) => () } } object A { def apply[E] = new PartiallyApplied[E] final class PartiallyApplied[E] { def apply[T1](fn: (T1) => Unit): Unit = () } }
[error] .\partial.scala:6:3: method apply in object A does not take parameters [error] A { (a: Unit) => () } [error]
No error like with Scala 3.2.0
The text was updated successfully, but these errors were encountered:
Minimized a bit:
final class PartiallyApplied { def apply(fn: Int): Unit = () } object A { def apply[X] = new PartiallyApplied } def Test = A(1)
Sorry, something went wrong.
I've bisected it to 882b435
Yes, that's intentioinal. We do not synthesize more than one apply method in a row. But here A(1) would expand to
apply
A(1)
A.apply[Int].apply(1)
This restriction is to guard against infinite apply expansion.
No branches or pull requests
Compiler version
3.2.1
3.2.2-RC1
Minimized code
Output
Expectation
No error like with Scala 3.2.0
The text was updated successfully, but these errors were encountered: