pattern matching bug (original) (raw)
Remi Forax forax at univ-mlv.fr
Wed Oct 24 10:08:32 UTC 2018
- Previous message: hg: amber/amber: 4 new changesets
- Next message: pattern matching bug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Using the amber-demo branch, this code prints bug and temp :) Again this bug was found by Francois Green.
public class SwitchBug {
static String hold(String item) -> switch(item) {
case String s -> { System.out.println(s); }
default -> "temp";
}
public static void main(String[] args) {
System.out.println(hold("bug"));
}
}
Rémi
- Previous message: hg: amber/amber: 4 new changesets
- Next message: pattern matching bug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]