Identifier expected on equals symbol

I have 1 small error in this line on the equals symbol. I don’t know what it is but it’s probably a dumb mistake or something. I really can’t see what I’ve done wrong.

 RaycastHit2D[] = Physics2D.RaycastAll(transform.position, 
 directions[selectedWay].transform.position - transform.position);

RaycastHit2D is just a type, not a field declaration. You need a name for your array, so for example:

  RaycastHit2D[] hits = Physics2D.RaycastAll(transform.position, directions[selectedWay].transform.position - transform.position);