The compiler behavior seems to be in sync with the spec:
From [1]:
"Any variable that is used but not declared in the guarding expression
of a guarded pattern must either be final or effectively final (4.12.4)."
And, from [2]:
"Any variable that is used but not declared in a |when| expressio
- Original Message -
> From: "cay horstmann"
> To: "Remi Forax" , "amber-spec-experts"
>
> Sent: Saturday, May 21, 2022 7:50:44 PM
> Subject: Re: Guard variable and being effectively final
> Hi Rémy,
>
> it compiles with b
Not sure if it's an implementation bug (bad error message from the compiler) or
a spec bug,
hence this message to both amber-dev and amber-spec-experts.
If i try to compile this code with Java 19 (which currently still uses &&
instead of when for a guard)
interface reverse_polish_notation {
s