Skip to content
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

Surface.methodsOf for Seq fails with Scala 3 #3409

Open
OndrejSpanel opened this issue Feb 25, 2024 · 1 comment
Open

Surface.methodsOf for Seq fails with Scala 3 #3409

OndrejSpanel opened this issue Feb 25, 2024 · 1 comment
Labels

Comments

@OndrejSpanel
Copy link
Contributor

OndrejSpanel commented Feb 25, 2024

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]]

@OndrejSpanel OndrejSpanel changed the title Surface.methodsOf for Seq fails with Scala 3 Surface.methodsOf for Seq fails with Scala 3 Feb 25, 2024
xerial added a commit that referenced this issue Feb 26, 2024
@xerial xerial added the bug label Feb 27, 2024
@OndrejSpanel
Copy link
Contributor Author

This part might be hopefully fixed by #3423:

constructor SizeCompareOps cannot be accessed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants