From d2e830afa100aebe2414f4d74773606adbfda540 Mon Sep 17 00:00:00 2001 From: Stuart Glaser Date: Sat, 28 Dec 2024 19:43:03 -0800 Subject: [PATCH] Test for a failing double-template with default --- integration-tests/tests/integration_test.rs | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/integration-tests/tests/integration_test.rs b/integration-tests/tests/integration_test.rs index 853e17b1b..f521bd1b1 100644 --- a/integration-tests/tests/integration_test.rs +++ b/integration-tests/tests/integration_test.rs @@ -12403,6 +12403,37 @@ fn test_override_typedef_fn() { run_test("", hdr, quote! {}, &["Foo"], &[]); } +#[test] +fn test_double_template_w_default() { + let hdr = indoc! {" + class Widget {}; + + template + class RefPtr { + private: + T* m_ptr; + }; + + class Container { + void* data_; + }; + + class FakeAlloc {}; + + template + class Holder { + A alloc; + }; + + typedef Holder> WidgetRefHolder; + class Problem { + public: + WidgetRefHolder& getWidgets(); + }; + "}; + run_test("", hdr, quote! {}, &["Problem"], &[]); +} + // Yet to test: // - Ifdef // - Out param pointers