Skip to content

Commit 0e7fe86

Browse files
committed
[Core] Add test for #18982
1 parent 4e5105e commit 0e7fe86

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

roottest/root/meta/rootcling/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,9 @@ ROOTTEST_ADD_TEST(ROOT10798
3232
ROOTTEST_GENERATE_DICTIONARY(streamerInfoStdFunctionDict streamerInfoStdFunction.h LINKDEF streamerInfoStdFunction.xml)
3333
ROOTTEST_ADD_TEST(streamerInfoStdFunction
3434
MACRO streamerInfoStdFunction.C
35-
DEPENDS ${GENERATE_DICTIONARY_TEST})
35+
DEPENDS ${GENERATE_DICTIONARY_TEST})
36+
37+
# Issue #18982
38+
ROOTTEST_ADD_TEST(selectTemplateInvalidArg
39+
COMMAND ${ROOT_rootcling_CMD} -f selectTemplateInvalidArg.Dict.cc ${CMAKE_CURRENT_SOURCE_DIR}/selectTemplateInvalidArg.h ${CMAKE_CURRENT_SOURCE_DIR}/selectTemplateInvalidArg.LinkDef.h
40+
ERRREF selectTemplateInvalidArg.ref)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifdef __CLING__
2+
3+
#pragma link off all globals;
4+
#pragma link off all classes;
5+
#pragma link off all functions;
6+
7+
#pragma link C++ class RtObj2<TNamed>+;
8+
9+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <TObject.h>
2+
3+
template <class T>
4+
class RtObj2 : public T
5+
{
6+
public:
7+
RtObj2() {}
8+
RtObj2( const T & val ) : T(val) {}
9+
ClassDefT(RtObj2,1)
10+
} ;
11+
12+
ClassDefT2(RtObj2,T)
13+
14+
ClassImpT(RtObj2,T)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Warning: Unused class rule: RtObj2<TNamed>

0 commit comments

Comments
 (0)