       assert message =~ "* :scheme"
     end
 
-    if :erlang.system_info(:otp_release) >= '21' do
-      test "annotates +/1 arithmetic errors" do
-        assert blame_message(:foo, &(+&1)) == "bad argument in arithmetic expression: +(:foo)"
-      end
-
-      test "annotates -/1 arithmetic errors" do
-        assert blame_message(:foo, &(-&1)) == "bad argument in arithmetic expression: -(:foo)"
-      end
-
-      test "annotates div arithmetic errors" do
-        assert blame_message(0, &div(10, &1)) ==
-                 "bad argument in arithmetic expression: div(10, 0)"
-      end
-
-      test "annotates rem arithmetic errors" do
-        assert blame_message(0, &rem(10, &1)) ==
-                 "bad argument in arithmetic expression: rem(10, 0)"
-      end
-
-      test "annotates band arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &band(&1, 10)) ==
-                 "bad argument in arithmetic expression: Bitwise.band(:foo, 10)"
-
-        assert blame_message(:foo, &(&1 &&& 10)) ==
-                 "bad argument in arithmetic expression: Bitwise.band(:foo, 10)"
-      end
-
-      test "annotates bor arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &bor(&1, 10)) ==
-                 "bad argument in arithmetic expression: Bitwise.bor(:foo, 10)"
-
-        assert blame_message(:foo, &(&1 ||| 10)) ==
-                 "bad argument in arithmetic expression: Bitwise.bor(:foo, 10)"
-      end
-
-      test "annotates bxor arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &bxor(&1, 10)) ==
-                 "bad argument in arithmetic expression: Bitwise.bxor(:foo, 10)"
-      end
-
-      test "annotates bsl arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &bsl(10, &1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bsl(10, :foo)"
-
-        assert blame_message(:foo, &(10 <<< &1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bsl(10, :foo)"
-      end
-
-      test "annotates bsr arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &bsr(10, &1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bsr(10, :foo)"
-
-        assert blame_message(:foo, &(10 >>> &1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bsr(10, :foo)"
-      end
-
-      test "annotates bnot arithmetic errors" do
-        use Bitwise
-
-        assert blame_message(:foo, &bnot(&1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bnot(:foo)"
-
-        assert blame_message(:foo, &(~~~&1)) ==
-                 "bad argument in arithmetic expression: Bitwise.bnot(:foo)"
-      end
+    test "annotates +/1 arithmetic errors" do
+      assert blame_message(:foo, &(+&1)) == "bad argument in arithmetic expression: +(:foo)"
+    end
+
+    test "annotates -/1 arithmetic errors" do
+      assert blame_message(:foo, &(-&1)) == "bad argument in arithmetic expression: -(:foo)"
+    end
+
+    test "annotates div arithmetic errors" do
+      assert blame_message(0, &div(10, &1)) ==
+               "bad argument in arithmetic expression: div(10, 0)"
+    end
+
+    test "annotates rem arithmetic errors" do
+      assert blame_message(0, &rem(10, &1)) ==
+               "bad argument in arithmetic expression: rem(10, 0)"
+    end
+
+    test "annotates band arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &band(&1, 10)) ==
+               "bad argument in arithmetic expression: Bitwise.band(:foo, 10)"
+
+      assert blame_message(:foo, &(&1 &&& 10)) ==
+               "bad argument in arithmetic expression: Bitwise.band(:foo, 10)"
+    end
+
+    test "annotates bor arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &bor(&1, 10)) ==
+               "bad argument in arithmetic expression: Bitwise.bor(:foo, 10)"
+
+      assert blame_message(:foo, &(&1 ||| 10)) ==
+               "bad argument in arithmetic expression: Bitwise.bor(:foo, 10)"
+    end
+
+    test "annotates bxor arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &bxor(&1, 10)) ==
+               "bad argument in arithmetic expression: Bitwise.bxor(:foo, 10)"
+    end
+
+    test "annotates bsl arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &bsl(10, &1)) ==
+               "bad argument in arithmetic expression: Bitwise.bsl(10, :foo)"
+
+      assert blame_message(:foo, &(10 <<< &1)) ==
+               "bad argument in arithmetic expression: Bitwise.bsl(10, :foo)"
+    end
+
+    test "annotates bsr arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &bsr(10, &1)) ==
+               "bad argument in arithmetic expression: Bitwise.bsr(10, :foo)"
+
+      assert blame_message(:foo, &(10 >>> &1)) ==
+               "bad argument in arithmetic expression: Bitwise.bsr(10, :foo)"
+    end
+
+    test "annotates bnot arithmetic errors" do
+      use Bitwise
+
+      assert blame_message(:foo, &bnot(&1)) ==
+               "bad argument in arithmetic expression: Bitwise.bnot(:foo)"
+
+      assert blame_message(:foo, &(~~~&1)) ==
+               "bad argument in arithmetic expression: Bitwise.bnot(:foo)"
     end
 
     defp blame_message(arg, fun) do

             |> message == "function nil.bar/0 is undefined"
    end

    test "UndefinedFunctionError for a callback" do
      defmodule Behaviour do
        @callback callback() :: :ok
        @optional_callbacks callback: 0
      end

      defmodule Implementation do
        @behaviour Behaviour
      end

      assert Exception.blame(:error, :undef, [{Implementation, :callback, 0, []}])
             |> elem(0)
             |> message ==
               "function ExceptionTest.Implementation.callback/0 is undefined or private" <>
                 ", but the behaviour ExceptionTest.Behaviour expects it to be present"
    end

    test "FunctionClauseError" do
      assert %FunctionClauseError{} |> message == "no function clause matches"


                 "you intend to invoke this macro"
    end

    test "annotates undefined function clause error with callback hints hints" do
      defmodule Behaviour do
        @callback callback() :: :ok
        @optional_callbacks callback: 0
      end

      defmodule Implementation do
        @behaviour Behaviour
      end

      assert blame_message(Implementation, & &1.callback()) ==
               "function ExceptionTest.Implementation.callback/0 is undefined or private" <>
                 ", but the behaviour ExceptionTest.Behaviour expects it to be present"
    end

    if :erlang.system_info(:otp_release) >= '23' do
      test "annotates undefined function clause error with otp obsolete hints" do
        assert blame_message(:erlang, & &1.hash(1, 2)) ==
