annotation information lost in scala 2.12 trait <p>Just updated a scala 2.11 + JavaFX project to 2.12.0-RC1, the code use java <code>@FXML</code> annotation intensively, e.g.</p> <pre><code>trait MainController { @FXML def onRun(event: ActionEvent) { val script = currentEngine.executeScript("editor.getValue()").toString runScript(script) } } &lt;MenuItem mnemonicParsing="false" onAction="#onRun" text="Run"&gt; &lt;accelerator&gt; &lt;KeyCodeCombination alt="UP" code="R" control="UP" meta="UP" shift="UP" shortcut="DOWN"/&gt; &lt;/accelerator&gt; &lt;/MenuItem&gt; </code></pre> <p>At runtime it throws error while executing <code>FXMLLoader.load</code>: </p> <pre><code>javafx.fxml.LoadException: Error resolving onAction='#onRun', either the event handler is not in the Namespace or there is an error in the script. </code></pre> <p>Seems that the <code>@FXML</code> annotation information has been lost during compilation. I have heard that in 2.12 all traits are compiled to interfaces, but how does this change cause the problem? Is there any workaround?</p>