     assert_compile_fail CompileError,
       "nofile:2: missing do keyword in def",
       '''
-      defmodule ErrorsTest do
+      defmodule Kernel.ErrorsTest.BodyessFunctionWithGuard do
         def foo(n) when is_number(n)
       end
       '''


  test :struct_access_on_body do
    assert_compile_fail CompileError,
      "nofile:3: cannot access struct TZ, the struct was not yet defined or the struct " <>
      "is being accessed in the same context that defines it",
      '''
      defmodule TZ do
        defstruct %{name: "Brasilia"}
        %TZ{}
      end
      '''
  end

    assert_compile_fail CompileError,
      "nofile:3: function exit/1 imported from both :erlang and Kernel, call is ambiguous",
      '''
      defmodule Kernel.ErrorsTest.FunctionImportConflict do
        import :erlang, warn: false
        def foo, do: exit(:test)
      end
