Skip to content

Are specialPolyClass ParamTypes inferable as type arguments or not? #5991

Open
@scabug

Description

@scabug

(Using Manifests to avoid interacting with #5990.)

def isItInferableAsATypeArg[A : Manifest](f: A => Unit) = manifest[A]

object Repeated extends ((Int*) => Unit) {
  def apply(x: Int*) {}
}

object ByName extends ((=> Int) => Unit) {
  def apply(x: => Int) {}
}

isItInferableAsATypeArg(Repeated)
error: type mismatch;
 found   : Repeated.type
 required: Seq[Int] => Unit

Okay, so no then!

isItInferableAsATypeArg(ByName)
error: No Manifest available for => Int.

Okay, so yes then?

Somewhere in here is a bug, right?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions