The Hunter Ranger's Whirlwind Attack feature states:
You can use your action to make a melee attack against any number of creatures within 5 feet of you, with a separate attack roll for each target.
It does not specify that the attack needs to be a melee weapon attack but only that it must be a melee attack. Does this mean that you would be able to cast a spell such as inflict wounds if you multi-classed into a class with this spell or if you took the Magic Initiate feat and chose to learn the shocking grasp spell?
I am aware that Whirlwind Attack does not actually count as taking the Attack action; However, clearly you can make a melee weapon attack with this feature, an option that ordinarily would require the "Attack action". So why could you not also make a melee spell attack, an option that ordinarily would require the "Cast a Spell action"?
I would like answers to assume that the following ruling made in the Sage Advice Compendium is correct:
Whirlwind Attack is unusual, in that it’s a single attack with multiple attack rolls...