Skip to content

Surface.methodsOf for Seq fails with Scala 3 #3409

Open
@OndrejSpanel

Description

Thanks for the recent bunch of fixes. The number of errors in my project is greatly reduced now. There are some new discovered thanks to using the workaround suggested in #3367. Tested with Scala 3.4.1-RC1 and surface 24.2.2, works fine in Scala 2:

build.sbt:

version := "0.1.0-SNAPSHOT"

scalaVersion := "3.4.1-RC1"

name := "airframe-surface-test"

libraryDependencies += "org.wvlet.airframe" %% "airframe-surface" % "24.2.2"

Main.scala:

import wvlet.airframe.surface.Surface

object Main {

  def main(args: Array[String]): Unit = {
    Surface.methodsOf[Seq[String]]
  }
}

produces following errors:

C:\Dev\airframe-surface-test\src\main\scala\Main.scala:6:5
wrong number of arguments at pickler for (z: => Any)(seqop: (Any, String) => Any, combop: (Any, Any) => Any): Any: (z: => Any)(seqop: (Any, String) => Any, combop: (Any, Any) => Any): Any, expected: 1, found: 0
    Surface.methodsOf[Seq[String]]

C:\Dev\airframe-surface-test\src\main\scala\Main.scala:6:22
Found:    (classOf[scala.collection.AnyConstr] : Class[scala.collection.AnyConstr])
Required: Class[?]
    Surface.methodsOf[Seq[String]]

C:\Dev\airframe-surface-test\src\main\scala\Main.scala:6:22
constructor SizeCompareOps cannot be accessed as a member of scala.collection.IterableOps.SizeCompareOps from object Main.
  private[collection] constructor SizeCompareOps can only be accessed from package scala.collection in package scala.
    Surface.methodsOf[Seq[String]]

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions