Skip to content

Commit 5f3799a

Browse files
committed
[cling] add regression test for issue root-project#7955
1 parent edc3786 commit 5f3799a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

core/metacling/test/TClingTests.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "TInterpreter.h"
55
#include "TROOT.h"
66
#include "TSystem.h"
7+
#include "TMethod.h"
8+
#include "TMethodArg.h"
79

810
#include "gmock/gmock.h"
911

@@ -333,3 +335,13 @@ struct ClassIsAggregate {
333335
EXPECT_TRUE(prop & clPropRef) << "Error checking property for class " << clName;
334336
}
335337
}
338+
339+
// https://github.com/root-project/root/issues/7955
340+
TEST(ClingAST, Issue7955)
341+
{
342+
auto cls = TClass::GetClass("std::vector<int>");
343+
auto meth = cls->GetMethodWithPrototype("operator[]","int",true, ROOT::kConversionMatch);
344+
auto args = meth->GetListOfMethodArgs();
345+
auto methArg = dynamic_cast<TMethodArg*>(args->First());
346+
EXPECT_STREQ(methArg->GetTypeName(), "vector<int>::size_type");
347+
}

0 commit comments

Comments
 (0)