How could I call module task in class task member?

In reply to Jules:

OK, it seems that the other simulators have a problem using $psprintf in a constant expression when all its arguments are constants.

You can get around this problem by overriding a factory string parameter explicitly to each module instance.