Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated code doesn't compile with "illegal start of expression" #66

Closed
JanWichniarek opened this issue Jun 18, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@JanWichniarek
Copy link

Hi,
When I define such structure:

type ColferA struct {
  value binary
}

type ColferB struct {
  value ColferA
}

then generated class ColferB doesn't compile with "illegal start of expression" and method marshalFit looks like this:

public int marshalFit() {
	long n = 1L + ;
	if (this.value != null) n += 1 + (long)this.value.marshalFit();
	if (n < 0 || n > (long)ColferB.colferSizeMax) return ColferB.colferSizeMax;
	return (int) n;
}

I'm using colfer-maven-plugin in version 1.12.

@pascaldekloe
Copy link
Owner

pascaldekloe commented Jun 18, 2020

Thanks for the nice report Jan. Sloppy mistake. Never sacrifice readability to eliminate some redundancy! 🤬 Will publish a new release, with plugin version 1.12.1 in an hour or so. Maven central sometimes needs a few hours to sync.

I'd love to advertise the exact colfer version in the plugin version. I remember Maven having classifiers (like jdk1.4). Do you know how to do that? The classifier element is not allowed in the POM—only dependency elements can have one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants