diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 2719f1df..b29bcc31 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,8 +14,8 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - erlang: "27.1"
-            elixir: "1.17"
+          - erlang: "27.2"
+            elixir: "1.18"
             lint: true
             coverage: true
             dialyzer: true
diff --git a/test/mint/http2/frame_test.exs b/test/mint/http2/frame_test.exs
index e9714706..ac1f1eb1 100644
--- a/test/mint/http2/frame_test.exs
+++ b/test/mint/http2/frame_test.exs
@@ -22,7 +22,11 @@ defmodule Mint.HTTP2.FrameTest do
   test "flag_set?/3" do
     assert flag_set?(0x08, :data, :padded) == true
     assert flag_set?(0x00, :data, :padded) == false
-    assert_raise FunctionClauseError, fn -> flag_set?(0x00, :data, :ack) end
+
+    # Typing violation if done at compile time.
+    assert_raise FunctionClauseError, fn ->
+      Code.eval_quoted(quote do: Mint.HTTP2.Frame.flag_set?(0x00, :data, :ack))
+    end
   end
 
   test "decode_next/1 with an incomplete frame" do