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
Error without file or line number information when compiling Akka with Scala 2.11.0-M8 #8219
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8219?orig=1
|
@retronym said: I can reproduce it with 2.10.3 (using the exact classpath as in your report):
|
@retronym said: I believe that we should create a throwaway Context in: // Typers.scala
def viewExists(from: Type, to: Type): Boolean = (
!from.isError
&& !to.isError
&& context.implicitsEnabled
&& (inferView(EmptyTree, from, to, reportAmbiguous = false) != EmptyTree)
) This is called in your example when performing overload resolution between the two Scala has a pretty gnarly approach to overload resolution, in which it checks if arguments of the types of candidate A could are applicable to to candidate B, and vice-versa. This should determine that the method in Anyway, during this applicability checking, implicit views are allowed. This triggers a search for an implicit view from |
@retronym said: Still need to minimize the test. |
Björn Antonsson (bjorn.antonsson) said: |
@retronym said (edited on Feb 3, 2014 9:59:40 AM UTC): trait Equalizer[T]
trait Gen[A]
class Broken {
implicit def const[T](x: T): Gen[T] = ???
implicit def convertToEqualizer[T](left: T): Equalizer[T] = ???
def in(a: Any) = ()
in {
import scala.Left
"" == ""
}
} Paul pointed out in another ticket that the fact the |
@retronym said: |
@retronym said: |
@retronym said: Reproduce code: case class Foo[+T[_]](activity:T[Long])
type Cell[T] = T
def insertCell(u:Foo[Cell]) = ???
insertCell(Foo(5)) Expected result: Actual result:
It seems to be related to using a type alias and a long. Those all produce type errors with line numbers: case class Foo2[+T[_]](color:T[String])
def insertCell2(u:Foo2[Cell]) = ???
insertCell2(Foo2("color"))
def insertOption(u:Foo[Option]) = ???
insertOption(Foo(5))
def insertOption2(u:Foo2[Option]) = ???
insertOption2(Foo2("color")) Another code sample that produces the same error message without line number: class DefaultType[Name]
case class Foo[+T[_]](
activity:T[Long]
)(t:DefaultType[T[_]])
Foo(3)(new DefaultType[Option[_]]) |
When compiling Akka I with 2.11.0-M8 I get a compilation error without line numbers or file information in one of the tests.
I've also tried with this SNAPSHOT version (2.11.0-20140131.015148-534) and it fails in the same way.
It might be that it's not one of the test frameworks that are using macros in a bad way, but I've "minimized" the problem to a standalone project.
The text was updated successfully, but these errors were encountered: