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

2.13.12 compiler failure without explicit type declaration #16

Open
rela13x opened this issue Sep 14, 2023 · 0 comments
Open

2.13.12 compiler failure without explicit type declaration #16

rela13x opened this issue Sep 14, 2023 · 0 comments

Comments

@rela13x
Copy link

rela13x commented Sep 14, 2023

repo to reproduce:
https://github.com/augustjune/context-applied

in a few words:

 scalaVersion := "2.13.12",
 libraryDependencies += compilerPlugin("org.augustjune" %% "context-applied" % "0.1.4"),

code

trait X[A] {
  def f(a: A): Int
}
implicit def derive[A: X, B: X] = new X[(A, B)] {
  override def f(a: (A, B)): Int = ???
}

leads to

[error] ## Exception when compiling 1 sources to /Users/alexr/dev/pp/scala-course-2-13-12/plain2/target/scala-2.13/classes
[error] java.lang.UnsupportedOperationException: Position.point on NoPosition
[error] scala.reflect.internal.util.Position.fail(Position.scala:24)
...

which basically understandable, but there is no understandable output.

can be fixed by:

  • removing context-applied plugin OR
  • adding explicit type :X[(A, B)] to derive function OR
  • setting scalaVersion := "2.13.11"
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

1 participant