For example, lets say that being a software developer is a legal occupation right now. But 2 years from now, it becomes illegal to develop software.
Can you be prosecuted for work that you've done in the past that has only recently become illegal?
Are there any legal protections / immunity currently in place to prevent this type of situation?