#How would I match fields in self?

1 messages · Page 1 of 1 (latest)

unreal brook
#

I have a value that I need to match, that i'm currently using if else statements for and I was wondering if there's a way using match, i.e. something like this (which doesn't compile):

let id = 12;
match id {
  self.A.x.id => (),
  self.A.y.id => (),
  self.B.x.id => (),
  self.B.y.id => (),
}
drowsy sand