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

Inconsistency in calling methods without dot selector #15686

Closed
WojciechMazur opened this issue Jul 15, 2022 · 2 comments
Closed

Inconsistency in calling methods without dot selector #15686

WojciechMazur opened this issue Jul 15, 2022 · 2 comments

Comments

@WojciechMazur
Copy link
Contributor

WojciechMazur commented Jul 15, 2022

Community build bug found in https://github.com/vladkopanev/cats-saga
Based on Open Community Build #2371
Part of #15647 regressions tracker

Compiler version

All Scala 3 versions
Compiles with Scala 2 (2.13.8)

Minimized code

class Foo{
  def bar[T](fn: () => T): T = ???
}

object Test {
  val x = new Foo
  x bar(() => "hello")  // is fine
  x bar[String](() => "world") // does not compile
}

Output

[error] ./test.scala:8:8: expression expected but '[' found
[error]   x bar[String](() => "hello")
[error]       

Expectation

Should compile

@som-snytt
Copy link
Contributor

som-snytt commented Jul 15, 2022

It came up previously that type args to infix application was a Scala 2 easter egg but not supportable.

I didn't find the discussion but there is a request for enhancement.

lampepfl/dotty-feature-requests#106

@odersky
Copy link
Contributor

odersky commented Jul 16, 2022

Yes, we are not supporting this, and I think we don't want to.

@odersky odersky closed this as completed Jul 16, 2022
@griggt griggt removed itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jul 16, 2022
@griggt griggt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants