Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5845

unresolved type constructor during implicit resolution: crash

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M3, Scala 2.10.0
    • Component/s: None
    • Labels:
      None

      Description

      The error message is similar to SI-4365, but this is not code or file order dependent that I have determined.

      class Num[T] {
        def mkOps = new Ops
        class Ops { def +++(rhs: T) = () }
      }
       
      class A {
        implicit def infixOps[T, CC[X] <: Num[X]](lhs: T)(implicit num: CC[T]) = num.mkOps
        implicit val n1 = new Num[Int] { }
        println(5 +++ 5)
      }
      

      T in class Num cannot be instantiated from ?CC
      	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:43)
      	at scala.tools.nsc.Global.abort(Global.scala:225)
      	at scala.reflect.internal.Types$AsSeenFromMap.throwError$1(Types.scala:4318)
      	at scala.reflect.internal.Types$AsSeenFromMap.toInstance$1(Types.scala:4372)
      	at scala.reflect.internal.Types$AsSeenFromMap.apply(Types.scala:4376)
      	at scala.reflect.internal.Types$TypeMap$$anonfun$noChangeToSymbols$2.apply(Types.scala:4011)
      	at scala.reflect.internal.Types$TypeMap$$anonfun$noChangeToSymbols$2.apply(Types.scala:4011)
      	at scala.collection.LinearSeqOptimized$class.forall(LinearSeqOptimized.scala:69)
      

        Attachments

          Activity

            People

            • Assignee:
              retronym Jason Zaugg
              Reporter:
              extempore Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: