Closed Sciss closed 4 years ago
Currently stopped by https://github.com/lampepfl/dotty/issues/9780
Compiles with Scala 3.0.0-M1. As soon as ScalaTest is published, I guess I can submit a PR, and we can publish a new stable version.
ScalaTest is there now. Running into problems with reflective calls (structural types):
// object Action
trait Wrapper extends Action.Trigger {
def peer: javax.swing.JComponent {
def addActionListener(a: ActionListener): Unit
def removeActionListener(a: ActionListener): Unit
def setAction(a: javax.swing.Action): Unit
def getAction(): javax.swing.Action // note: must keep empty parentheses for Java compatibility
}
private var _action: Action = Action.NoAction
def action: Action = _action
def action_=(a: Action): Unit = { _action = a; peer.setAction(a.peer) }
when I call action_=, it gives
[error] Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: scala
[error] at scala.swing.package$.reflectiveCalls(package.scala:93)
[error] at scala.swing.Action$Trigger$Wrapper.action_$eq(Action.scala:41)
[error] at scala.swing.Action$Trigger$Wrapper.action_$eq$(Action.scala:30)
[error] at scala.swing.AbstractButton.action_$eq(AbstractButton.scala:25)
...
PR ready now: https://github.com/scala/scala-swing/pull/124
fixed in #124
Add a build for latest Dotty (as of this writing 0.27.0-RC1), and then publish an artifact.