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

Open
blast-hardcheese opened this Issue Nov 5, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@blast-hardcheese

blast-hardcheese commented Nov 5, 2018

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.

blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this issue Nov 8, 2018

blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this issue Nov 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment