[string-templates] Javac accepts char literal as template
Jim Laskey
james.laskey at oracle.com
Tue Jul 25 09:29:09 UTC 2023
It is indeed a bug. Apologies. I’m very surprised I missed that. I will file a bug against this.
📱
> On Jul 25, 2023, at 5:43 AM, Tagir Valeev <amaembo at gmail.com> wrote:
>
> Hello!
>
> Code:
>
> public class Demo {
> public static void main(String[] args) {
> System.out.println(STR.'\{1+2}');
> }
> }
>
> Latest javac (build 22-ea+7-489) compiles this and produces 3 as an
> output. I believe this is a mistake in the compiler.
>
> With best regards,
> Tagir Valeev
More information about the amber-dev
mailing list