You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.info(s"Message with id=${msg.getId}, submittedAt=${msg.getSubmittedAt} will be dropped.")
I'm getting the compiler error:
[ERROR] <CUT>/src/main/scala/<CUT>/SubscriberWithScheduling.scala:36: error: no `: _*' annotation allowed here
[INFO] (such annotations are only allowed in arguments to *-parameters)
[INFO] logger.info(s"Message with id=${msg.getId}, submittedAt=${msg.getSubmittedAt} will be dropped.")
[INFO]
It works with v. 3.5.0.
What's the problem?
The text was updated successfully, but these errors were encountered:
After wrapping varargs, the user code fails to compile.
In Scala 2, there were no inline parameters, and the subtype of args was obtained during compilation. However, this approach may not always be accurate.
Regarding #191
There is an issue with obtaining inline parameters in Scala 3.
To address this, we recursively obtain the actual value of inline parameters. This necessitates the ongoing use of inlining in the parameters of the wrapper function. For instance:
```scala
class LogWrapper(val underlying: Logger) {
inline def info(message: String, inline args: AnyRef*): Unit = underlying.info(message, args: _*)
}
```
This ensures compatibility and accurate handling of inline parameters in both Scala 2 and Scala 3.
After wrapping varargs, the user code fails to compile.
In Scala 2, there were no inline parameters, and the subtype of args was obtained during compilation. However, this approach may not always be accurate.
Regarding #191
There is an issue with obtaining inline parameters in Scala 3.
To address this, we recursively obtain the actual value of inline parameters. This necessitates the ongoing use of inlining in the parameters of the wrapper function. For instance:
```scala
class LogWrapper(val underlying: Logger) {
inline def info(message: String, inline args: AnyRef*): Unit = underlying.info(message, args: _*)
}
```
This ensures compatibility and accurate handling of inline parameters in both Scala 2 and Scala 3.
Hi,
With the following piece of code:
I'm getting the compiler error:
It works with v. 3.5.0.
What's the problem?
The text was updated successfully, but these errors were encountered: