-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I'm using Scala 2.11.7 with UndoFX in my project, and when I try to compile, the compile fails with assertion failed: TVar<?0=null>
.
This only happens with UndoFX 1.2, and it was fine before on UndoFX 1.1.1, and the only changes I've made are to comply with 1.2's new interface. I've even changed from using SAM conversion to instantiate the undo manager to anonymous classes, and the failure still takes place. Even a stacktrace simply spits out internal Scala compiler errors, so I can't quite debug what's causing the error.
My build tool is Gradle 2.7, if it means anything.
I've also tried this on a fresh Gradle Scala project, and the same error results.
This is the sample code for the fresh project that fails to compile:
import java.util.function.{Consumer, Function}
import org.fxmisc.undo.UndoManagerFactory
import org.reactfx.EventSource
object Main {
val changes = new EventSource[Change]
val undoManager = UndoManagerFactory.unlimitedHistoryUndoManager(
changes,
new Function[Change, Change] {
override def apply(t: Change): Change = t.invert
},
new Consumer[Change] {
override def accept(t: Change): Unit = t.apply()
}
)
}
case class Change(oldVal: Boolean, newVal: Boolean) {
def invert: Change = Change(newVal, oldVal)
def apply(): Unit = println(newVal)
}
Metadata
Metadata
Assignees
Labels
No labels