That sounds like an Internal Compiler Error (ICE - aka a bug in the compiler). Are you able to post the complete error message and the code which triggered the issue?
If you can at least post the full error message from the compiler, then we might be able to tell you what went wrong. Otherwise, we don't have much to go by.
For normal errors, 90% of the time, the answer is in the error message itself and the compiler will often suggest ways to fix it.
If it's an ICE, it will at least give the compiler devs a backtrace they can use to troubleshoot it.