|
|
|
@ -30,6 +30,7 @@ val x = y match {
|
|
|
|
case 1 : Int => 2
|
|
|
|
case 1 : Int => 2
|
|
|
|
case a : B with C => d
|
|
|
|
case a : B with C => d
|
|
|
|
case _: B | _: C => 3
|
|
|
|
case _: B | _: C => 3
|
|
|
|
|
|
|
|
case Object.Constant => 3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
---
|
|
|
|
@ -47,6 +48,9 @@ val x = y match {
|
|
|
|
(alternative_pattern
|
|
|
|
(alternative_pattern
|
|
|
|
(typed_pattern (wildcard) (type_identifier))
|
|
|
|
(typed_pattern (wildcard) (type_identifier))
|
|
|
|
(typed_pattern (wildcard) (type_identifier)))
|
|
|
|
(typed_pattern (wildcard) (type_identifier)))
|
|
|
|
|
|
|
|
(integer_literal))
|
|
|
|
|
|
|
|
(case_clause
|
|
|
|
|
|
|
|
(stable_identifier (identifier) (identifier))
|
|
|
|
(integer_literal))))))
|
|
|
|
(integer_literal))))))
|
|
|
|
|
|
|
|
|
|
|
|
============================
|
|
|
|
============================
|
|
|
|
@ -136,6 +140,7 @@ Capture patterns
|
|
|
|
val x = y match {
|
|
|
|
val x = y match {
|
|
|
|
case a @ B(1) => a
|
|
|
|
case a @ B(1) => a
|
|
|
|
case b @ C(d @ (e @ X, _: Y)) => e
|
|
|
|
case b @ C(d @ (e @ X, _: Y)) => e
|
|
|
|
|
|
|
|
case req @ (POST | GET) -> Root / "test" => 5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
---
|
|
|
|
@ -156,4 +161,11 @@ val x = y match {
|
|
|
|
(tuple_pattern
|
|
|
|
(tuple_pattern
|
|
|
|
(capture_pattern (identifier) (identifier))
|
|
|
|
(capture_pattern (identifier) (identifier))
|
|
|
|
(typed_pattern (wildcard) (type_identifier))))))
|
|
|
|
(typed_pattern (wildcard) (type_identifier))))))
|
|
|
|
(identifier))))))
|
|
|
|
(identifier))
|
|
|
|
|
|
|
|
(case_clause
|
|
|
|
|
|
|
|
(infix_pattern
|
|
|
|
|
|
|
|
(infix_pattern
|
|
|
|
|
|
|
|
(capture_pattern (identifier)
|
|
|
|
|
|
|
|
(tuple_pattern (alternative_pattern (identifier) (identifier))))
|
|
|
|
|
|
|
|
(operator_identifier) (identifier)) (operator_identifier) (string))
|
|
|
|
|
|
|
|
(integer_literal))))))
|
|
|
|
|