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 a function fails in Scala 3 #3410

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

Surface.methodsOf for a function fails in Scala 3 #3410

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

Comments

@OndrejSpanel
Copy link
Contributor

OndrejSpanel commented Feb 25, 2024

Another one 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[Double => String]
  }
}

produces following error:

C:\Dev\airframe-surface-test\src\main\scala\Main.scala:6:22
Found:    R => Double
Required: String => Any
    Surface.methodsOf[Double => String]

@OndrejSpanel OndrejSpanel changed the title Surface.methodsOf for a function fails in Scala 3 Surface.methodsOf for a function fails in Scala 3 Feb 25, 2024
@xerial xerial added the bug label Feb 27, 2024
@OndrejSpanel
Copy link
Contributor Author

I think this should be also fixed by #3455 - functions are represented as generic traits for the purpose of surfaces.

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