Scala Programming Language
  1. Scala Programming Language
  2. SI-3343

confusing error message when type constructor inference infers ill-kinded type argument

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Misc Compiler
    • Labels:
      None
    • Environment:

      tcpoly_infer

      Description

      import scala.collection.mutable.Builder
      class Converter[T]
      object SimpleIntConverter extends Converter[Int]
      
      class TraversableConverter[T, Coll[X] <: Traversable[X]](converter: Converter[T], builder: Builder[T, Coll[T]]) extends Converter[Coll[T]] 
      
      val tc: Converter[List[Int]] = new TraversableConverter(SimpleIntConverter, new ListBuffer[Int])
      
      error: kinds of the type arguments (Int,List[X]) do not conform to the expected kinds of the type parameters (type T,type Coll) in class TraversableConverter.
      List[X]'s type parameters do not match type Coll's expected parameters: class List has one type parameter, but type Coll has one
      

      repeat 100x:
      I must not infer ill-kinded types
      I must not break reflexivity of numeric equality...

        Activity

        Hide
        Paul Phillips added a comment -

        I guess the bot only recognizes #3343 and not SI-3343. Fixed in r25110.

        Show
        Paul Phillips added a comment - I guess the bot only recognizes #3343 and not SI-3343 . Fixed in r25110.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Adriaan Moors
            TracCC:
            spiros
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development