-
Notifications
You must be signed in to change notification settings - Fork 161
Make constants inline val
?
#618
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
Labels
Comments
In another project I tried
So, I'm not sure this will work. |
[error] -- Error: /workspace/scala-js-dom/dom/src/main/scala-3/org/scalajs/dom/AppendMode.scala:6:23
[error] 6 | inline val segments: AppendMode = "segments"
[error] | ^^^^^^^^^^
[error] | inline value must have a literal constant type Closing unless somebody knows a workaround. |
Aha! This works. package org.scalajs.dom
opaque type AppendMode <: String = String
object AppendMode {
opaque type segments <: AppendMode = "segments"
inline val segments: segments = "segments"
val sequence: AppendMode = "sequence"
} So, now its the bincompat question again. |
Well, darn. [error] dom: Failed binary compatibility check against org.scala-js:scalajs-dom_sjs1_3:2.0.0! Found 1 potential problems
[error] * method segments()java.lang.String in object org.scalajs.dom.AppendMode#package#AppendMode does not have a correspondent in current version
[error] filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("org.scalajs.dom.AppendMode#package#AppendMode.segments") |
Turns out this was never going to work anyway. See: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Came up in #592 (comment). H/t @smarter. The question is if we can make this change binary-compatibly.
The text was updated successfully, but these errors were encountered: