Scala3 type bug when used with java #16029
-
In a new Scala3 types system, if I write two simple classes in Scala as follows
&
And then use them in Java as well as in Scala would produce different output, for example:
Would will produce output as:
And running the same in Scala would be something different:
&
So the same simple API works differently for Java as well as in Scala.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The above two classes ScalaClass & ScalaClass1 would look something like this
&
|
Beta Was this translation helpful? Give feedback.
-
What would happen if instead of using constants like:
we use the variable instead
or produce runtime exception/compile time exception when compiling java/scala code combinedly. |
Beta Was this translation helpful? Give feedback.
-
A Scalafix rule could lint features not supported in Java or known interop issues. At a glance, I don't see that such a rule has been written at https://scalacenter.github.io/scalafix/docs/rules/community-rules.html |
Beta Was this translation helpful? Give feedback.
A Scalafix rule could lint features not supported in Java or known interop issues.
At a glance, I don't see that such a rule has been written at https://scalacenter.github.io/scalafix/docs/rules/community-rules.html