Good question. I had to do a bit of research - I knew it wasn't allowewd in inline functions, but was unsure about multi-statement and scalar functions.
The link provided in the explanation is for SQL Server 2005; here are two links for the current version:
http://msdn.microsoft.com/en-us/library/ms175976.aspx
http://msdn.microsoft.com/en-us/library/ms186755.aspx