--- /dev/null
+#! [contains] ok
+match "ok" {
+ case v: <<< v >>>;
+}
--- /dev/null
+#! [contains] ok
+
+match 1 {
+ case 1: <<< "ok" >>>;
+ case 2: <<< "not ok" >>>;
+}
--- /dev/null
+#! [contains] ok
+
+match 1 {
+ case 1 when 1 : <<< "ok" >>>;
+ case 1: <<< "ok" >>>;
+}
--- /dev/null
+#! [contains] ok
+
+match 1 {
+ case 1 when 0 : <<< "not ok" >>>;
+ case 1: <<< "ok" >>>;
+}
--- /dev/null
+#! [contains] too many expression to match
+match 1 {
+ case a,b: <<< "WHAT?" >>>;
+}
--- /dev/null
+class C {
+ string name;
+ int age;
+}
+
+C charles;
+"charles" => charles.name;
+21 => charles.age;
+
+match charles {
+ case >(name, age): <<< name , " is ", age, " years old." >>>;
+}