In reply to muralikrishna229:
This only can work with a ref task argument. See const ref | Verification Academy