I ran into a weird compiler bug telling me I've got a "Broken casting" in my line, but I don't cast anything at all in the line. This is how to reproduce the bug:
void TestMethod() { Sleep(1);}
Same would happen when you try to put it all into one line: void TestMethod() {Sleep(1);}
Putting the closing bracket in the next line fixes the problem:
void TestMethod() { Sleep(1); }