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

Unused type parameter confuses typer, broke in 2.12.4 #11243

Closed
blast-hardcheese opened this issue Nov 5, 2018 · 1 comment
Closed

Unused type parameter confuses typer, broke in 2.12.4 #11243

blast-hardcheese opened this issue Nov 5, 2018 · 1 comment

Comments

@blast-hardcheese
Copy link

Code to repro (repository), with some comments for different cases that actually work:

package bug

class Foo[A]

object Bar {
  // Traceback in https://github.com/blast-hardcheese/scala-issue/blob/master/README.md
  (new Foo).bogus[(Long, Long)]

  // [error] /private/tmp/bug/src/main/scala/bug.scala:10:16: value bogus is not a member of bug.Foo[A]
  // [error]   (new Foo).bogus[Long]
  // [error]             ^
  // [error] one error found
  //
  // (new Foo).bogus[Long] // Gives an appropriate error message

  // [error] /private/tmp/bug/src/main/scala/bug.scala:7:19: value bogus is not a member of bug.Foo[Long]
  // [error]   (new Foo[Long]).bogus[(Long, Long)]
  // [error]                   ^
  // [error] one error found
  //
  // (new Foo[Long]).bogus[(Long, Long)]
}

I tried against 2.12.8-bin-5fca7b2 and got the same unhelpful error, but 2.12.0-2.12.3 give helpful errors.

@hrhino
Copy link

hrhino commented Apr 14, 2020

I think this was fixed by scala/scala#8515.

@hrhino hrhino modified the milestones: 2.12.12, 2.12.11 Apr 14, 2020
@hrhino hrhino self-assigned this Apr 14, 2020
@hrhino hrhino closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants