Skip to content

Character literal escapes not preserved in generated stubs #720

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

Open
rsmckinney opened this issue May 28, 2025 · 0 comments
Open

Character literal escapes not preserved in generated stubs #720

rsmckinney opened this issue May 28, 2025 · 0 comments

Comments

@rsmckinney
Copy link
Member

rsmckinney commented May 28, 2025

An extension class on the following type will fail.

public class StringTag implements Tag {
    . . .
    private static final char SINGLE_QUOTE = '\'';
    . . .
}
.../StringTag.java:11: error: empty character literal
    private static final char SINGLE_QUOTE = (char)''';
                                                   ^
.../StringTag.java:11: error: unclosed character literal
    private static final char SINGLE_QUOTE = (char)''';
                                                     ^
An exception has occurred in the compiler (21.0.2). Please file a bug...

From discussion: https://discord.com/channels/1263152297190359132/1377344023227928597

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

No branches or pull requests

1 participant