I'm using Vavr to do pattern matching on a vavr-tuple but I can't seem to do get the pattern matching to work in tuple.
Here is my code
Tuple2 test = Tuple.of("foo", "bar");
Match(test)
.of(
Case($(API.Tuple("foo",$())), "baz")
);
Here is the error message I get
io.vavr.MatchError: type: io.vavr.Tuple2, value: (foo, bar)
at io.vavr.API$Match.of(API.java:5095)....
I expect the wild card to ignore what the second element is in the tuple.
This way of using the $() wild card seems to work though, so it seems like I can't use it within a tuple
Tuple2 test = Tuple.of("foo", "bar");
Match(test)
.of(
Case($(), "baz")
);
What am I doing wrong here?