This isn’t standard syntax. QuestaSim allows this, but specifically mentions that this is an extension to SystemVerilog so that you know that this code might cause problems when switching vendors.
I’ve tried it out with another Big Three vendor and there it’s also supported with a special compile switch.