Decomposer patterns supported: any expression resolvable in the context of the matched one and returning a tuple is a decomposer
This commit is contained in:
@@ -43,5 +43,9 @@ fun test() {
|
||||
is (1, 1) => 1
|
||||
is (1, <error>"1"</error>) => 1
|
||||
is <error>(1, "1", *)</error> => 1
|
||||
is boo @ (1, <error>"a"</error>, *) => 1
|
||||
is boo @ <error>(1, *)</error> => 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val (Int, Int).boo : (Int, Int, Int) = (1, 1, 1)
|
||||
|
||||
Reference in New Issue
Block a user