3.8.0 fails to parse numeric literal separators
mr-git opened this issue · comments
Mareks Rampāns commented
Following code fails when using version 3.8.0:
def f = 1_000_000_000.0 // fails to parse
def d = 1_000_000_000d // fails to parse
def D = 1_000_000_000D // fails to parse
def l = 1_000_000_000L // ok
def tD = 1_000_000_000.toDouble // ok
def compact = 1000000000d // ok
Error (input string depends on code):
org.scalafmt.sbt.ScalafmtSbtReporter$ScalafmtSbtError: scalafmt: For input string: "1_000_000_000d"
https://www.baeldung.com/scala/underscore#2-numeric-literal-separator-scala-213