COMMUNITY

JVM target: Duplicate field on class ...: <init> ()V

Howdy,

So I thought i would take the new jvm target for a spin and hit this problem:

Duplicate field on class haxe.ui.core.ComponentLayout: <init> ()V

Is there anyway to get more information on this error? Im pretty sure the field that is duplicated isnt “init” as there is no init function, the line numbers just lead to a @:build macro (which does various things wrt to fields - so likely its something in there), and dump=pretty doesnt really give me any other clues either.

This all seems to work on other targets (including hxJava) so im wondering if this is a jvm bug or some iffy macro that ive written that was OK for the older targets - so id ideally like to get more information about it (--verbose didnt really point me to anything useful either).

Any clues / pointers?

Cheers,
Ian

Do you get this at run-time? That surely looks like a compiler issue, please report :slight_smile:

1 Like

Note that <init> is the constructor.

1 Like

I dont - i get this at compile time - the problem with reporting it as an issue is the haxeui-core dependency, which is pretty big. Ill spend a bit of time seeing if i can get the same thing to happen in a minimal test - any ideas if there is a way to know what the field that it thinks is duplicated is?

Thanks,
Ian

Ah, OK, so its saying the field that is duplicated is a constructor, noted - ill see if i can get something minimal together.

That was easy :slight_smile:

1 Like