From af7ea6adaf3151b0d1abada4dc8819ab95e0de01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sinan=20G=C3=BCm=C3=BC=C5=9Fkabak?= <256841712+sinangumuskabak-sys@users.noreply.github.com> Date: Sat, 26 Sep 2026 17:39:53 +0300 Subject: [PATCH] test: member JSX tag must not bind to a local function by its last segment --- tests/test_jsx_component_usage_calls.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_jsx_component_usage_calls.py b/tests/test_jsx_component_usage_calls.py index 52cc8dad4..a6c563ba2 100644 --- a/tests/test_jsx_component_usage_calls.py +++ b/tests/test_jsx_component_usage_calls.py @@ -107,3 +107,16 @@ def test_underscore_component_is_not_treated_as_intrinsic(tmp_path: Path): ) }) assert ("Table()", "_Row()") in calls + + +def test_member_tag_does_not_bind_to_local_function_by_last_segment(tmp_path: Path): + # `` is a member of Theme, not the unrelated local Provider(). + calls, _ = _calls(tmp_path, { + "theme.tsx": "export const Theme = { x: 1 };\n", + "app.tsx": ( + "import { Theme } from './theme';\n" + "function Provider() { return null; }\n" + "export function App() { return ; }\n" + ), + }) + assert ("App()", "Provider()") not in calls