Skip to content
New issue

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

Error when using two non conflicting apply methods in a row #15969

Closed
KacperFKorban opened this issue Sep 4, 2022 · 1 comment · Fixed by #15970
Closed

Error when using two non conflicting apply methods in a row #15969

KacperFKorban opened this issue Sep 4, 2022 · 1 comment · Fixed by #15970
Assignees
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Milestone

Comments

@KacperFKorban
Copy link
Member

KacperFKorban commented Sep 4, 2022

Compiler version

3.2.1-RC1-bin-20220831-398b72e-NIGHTLY
compiles correctly with 3.2.0-RC1

Minimized code

object Obj {
  def apply[L]: Unit = ???

  extension (make: Unit) def apply(value: Int): String = ???

  def test: String = Obj[Int](1)
}

Output

[error] ./sagerbug.scala:6:22: method apply in object Obj does not take parameters
[error]   def test: String = Obj[Int](1)
[error]                      ^^^^^^^^

Expectation

Compile correctly.
i.e. Obj[Int](1) should get expanded to calls to both apply methods.

@KacperFKorban KacperFKorban added itype:bug regression This worked in a previous version but doesn't anymore stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 4, 2022
@KacperFKorban
Copy link
Member Author

bisect points to 882b435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants