Change FooFactory's return type to long and consider following FXML:
<?import io.github.paullo612.mlfx.compiler.test.Crankshaft?>
<?import io.github.paullo612.mlfx.compiler.test.Crankpin?>
<?import io.github.paullo612.mlfx.compiler.test.FooFactory?>
<Crankshaft xmlns="http://javafx.com/javafx/19.0.0" xmlns:fx="http://javafx.com/fxml/1">
<fx:define>
<!-- Save primitive that takes two slots -->
<FooFactory fx:id="pinId" fx:factory="foo" />
<!-- Save reference that takes one slot after -->
<Crankpin fx:id="firstPin" id="1" />
</fx:define>
<crankpins>
<!-- And let it all crash with VerifyError -->
<fx:reference source="firstPin"/>
<Crankpin id="$pinId"/>
</crankpins>
</Crankshaft>
This will crash with java.lang.VerifyError on load attempt.
Change
FooFactory
's return type tolong
and consider following FXML:This will crash with
java.lang.VerifyError
on load attempt.