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

Arrays marked const lose their array qualifier in translation #689

Closed
bitwizeshift opened this Issue Jan 16, 2016 · 1 comment

Comments

Projects
None yet
5 participants
@bitwizeshift
Copy link
Contributor

commented Jan 16, 2016

Any array variable marked 'const' loses [] in translation to Java/C++/php/etc..

Example:

class A{
  const String[] S = {"...","..."};
}

Java output:

public class A
{
  ...
  public static final String S = "...","...";
  ...
}
@Shikib

This comment has been minimized.

Copy link
Member

commented Jan 16, 2016

The issue extends to initializing arrays with values overall. The following code doesn't generate a member variable at all.

class A {
  String[] S = {"a", "b"};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.