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

Method surface for Int uses deprecated string addition with Scala 3.4.1 #3413

Open
OndrejSpanel opened this issue Feb 26, 2024 · 0 comments
Open
Labels

Comments

@OndrejSpanel
Copy link
Contributor

Method surface for Int produces warning about deprecated string addition with Scala 3.4.1

Build.sbt:

version := "0.1.0-SNAPSHOT"

scalaVersion := "3.4.1-RC1"

scalacOptions ++= Seq("-deprecation", "-feature", "-Werror")

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[Int]
  }
}

Error is:

C:\Dev\airframe-surface-test\src\main\scala\Main.scala:6:22
method + in class Int is deprecated since 2.13.0: Adding a number and a String is deprecated. Use the string interpolation `s"$num$str"`
    Surface.methodsOf[Int]

A similar error is produced when using some other primitive types (Double, Float, Short, Byte)

Note: while it may seem is has no sense to query for methods of Int, such situation can happen when processing type recursively or automatically.

@xerial xerial added the bug label Feb 27, 2024
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