From 8fb58bdd69ddc8d3225c1e537ada4834e0a6a676 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Wed, 14 Oct 2026 23:45:47 +0300 Subject: [PATCH 1/2] Tests: define the static data members the test headers declare Without definitions libbleh.so has undefined data symbols, so it can't be loaded eagerly (dlopen with RTLD_NOW, and the loaders of the languages that bind the whole library at once). Functions resolve lazily, data doesn't, which is why the C# tests never noticed. They're inline, so no extra file is needed. Co-Authored-By: Claude Fable 5.1 --- test/input/MR/test_matching_layout.h | 2 +- test/input/MR/test_member_vars.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/input/MR/test_matching_layout.h b/test/input/MR/test_matching_layout.h index ba5254ef..23f385c7 100644 --- a/test/input/MR/test_matching_layout.h +++ b/test/input/MR/test_matching_layout.h @@ -19,7 +19,7 @@ namespace MR::MatchingLayout int arr2d[4][5]; // Having static fields is not an error! Those get their normal getters and setters. - static int x; + static inline int x = 0; }; struct B diff --git a/test/input/MR/test_member_vars.h b/test/input/MR/test_member_vars.h index 5513b053..b899d38c 100644 --- a/test/input/MR/test_member_vars.h +++ b/test/input/MR/test_member_vars.h @@ -7,8 +7,8 @@ namespace MR::MemberVars int x; const int y; - static int z; - static const int w; + static inline int z = 0; + static inline const int w = 0; int &ref; // Those don't get setters, and also get only one (non-const-propagating) getter. int arr[4]; // Arrays don't get setters, because they aren't assignable. But they still get mutable getters From afd413b12f1530b54e833c296a1ce6a89f9bee8a Mon Sep 17 00:00:00 2001 From: Egor Mikhaylov Date: Thu, 15 Oct 2026 07:08:45 -0500 Subject: [PATCH 2/2] `static inline` -> `inline static`. --- test/input/MR/test_matching_layout.h | 2 +- test/input/MR/test_member_vars.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/input/MR/test_matching_layout.h b/test/input/MR/test_matching_layout.h index 23f385c7..0f5f782b 100644 --- a/test/input/MR/test_matching_layout.h +++ b/test/input/MR/test_matching_layout.h @@ -19,7 +19,7 @@ namespace MR::MatchingLayout int arr2d[4][5]; // Having static fields is not an error! Those get their normal getters and setters. - static inline int x = 0; + inline static int x = 0; }; struct B diff --git a/test/input/MR/test_member_vars.h b/test/input/MR/test_member_vars.h index b899d38c..9b86243c 100644 --- a/test/input/MR/test_member_vars.h +++ b/test/input/MR/test_member_vars.h @@ -7,8 +7,8 @@ namespace MR::MemberVars int x; const int y; - static inline int z = 0; - static inline const int w = 0; + inline static int z = 0; + inline static const int w = 0; int &ref; // Those don't get setters, and also get only one (non-const-propagating) getter. int arr[4]; // Arrays don't get setters, because they aren't assignable. But they still get mutable getters