New ambiguous implicits error in Scala 2.11.4 (works in 2.11.2) with macros #8947
Comments
|
Imported From: https://issues.scala-lang.org/browse/SI-8947?orig=1 |
|
@paulp said: Here's a way to get the same error with one little file, on 2.11.2 or 2.11.4, which may serve to illustrate what's going on. Then again, it may not. object X { implicitly } |
|
@retronym said: |
|
@retronym said: |
|
@retronym said (edited on Oct 30, 2014 2:11:17 AM UTC): @propensive I've listed a few workarounds in the test case in the pull request. |
|
@propensive said: |
If you compile a.scala, then b.scala with 2.11.4, then you get the ambiguous implicits error shown beneath. For the problem to be apparent, a.scala must be compiled with 2.11.4, but b.scala can be compiled with either 2.11.2 or 2.11.4 (i.e. I'd infer that the problem is with the binaries produced by 2.11.4).
The most interesting thing about it is that the method
fooand the macro seem to be completely unrelated. The error still occurs iffoogets moved to a separate object.You can also see the problem in the REPL.
a.scala:
b.scala:
output:
The text was updated successfully, but these errors were encountered: