title: Sql function that should error but instead creates successfully
body: <p>I'm debugging a larger script and narrowed it down to the fact that a function is being created when it should error.</p>
  
  <p>I tested the following function which SHOULD fail:</p>
  
  <pre><code>CREATE FUNCTION ShouldFail( @x INT )
  RETURNS int
  AS
  BEGIN 
  DECLARE @i INT
  
  SELECT @i = id FROM dbo.IDontExist
  RETURN @i
  END
  </code></pre>
  
  <p>Instead the creation succeeds.  Any ideas why?</p>